/* Custom styles for Compost Coach */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    overscroll-behavior: none;
}

/* Hide scrollbar but allow scrolling */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Material Symbols filled style */
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom range slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

input[type=range]::-webkit-slider-track {
    height: 8px;
    background: #3b4754;
    border-radius: 4px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #137fec;
    margin-top: -10px;
    box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.2);
    transition: box-shadow 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:active {
    box-shadow: 0 0 0 8px rgba(19, 127, 236, 0.3);
}

input[type=range]::-moz-range-track {
    height: 8px;
    background: #3b4754;
    border-radius: 4px;
}

input[type=range]::-moz-range-thumb {
    height: 28px;
    width: 28px;
    border: none;
    border-radius: 50%;
    background: #137fec;
    box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.2);
}

/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background: #137fec;
    border-color: #137fec;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Temperature gauge colors */
.temp-cold { color: #3b82f6; }
.temp-warming { color: #10b981; }
.temp-optimal { color: #22c55e; }
.temp-hot { color: #f59e0b; }
.temp-danger { color: #ef4444; }

/* Pulse animation for alerts */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: currentColor;
    animation: pulse-ring 1.5s ease-out infinite;
    opacity: 0.3;
}

/* Shimmer effect for loading */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

/* Screen transitions */
.screen {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bottom navigation safe area */
.bottom-nav {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Card hover effects */
.card-interactive {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-interactive:active {
    transform: scale(0.98);
}

/* Status badges */
.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-cooling {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.status-ready {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 160px;
    width: 100%;
}

/* Voice recording indicator */
@keyframes recording-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.recording-indicator {
    animation: recording-pulse 1s ease-in-out infinite;
}

/* Touch feedback */
.touch-feedback {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.touch-feedback:active {
    opacity: 0.8;
}
