/* Geezer Gourmet Kitchen Timer - Styles */

/* =========================================================================
   ROOT & POSITIONING
   ========================================================================= */
.gkt-root {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #C8E0F4;
}
.gkt-pos-bottom-right { top: 10px; left: 50%; transform: translateX(-50%); }
.gkt-pos-bottom-left { top: 10px; left: 50%; transform: translateX(-50%); }
.gkt-pos-top-right { top: 10px; left: 50%; transform: translateX(-50%); }
.gkt-pos-top-center { top: 10px; left: 50%; transform: translateX(-50%); }

/* =========================================================================
   MINIMIZED STATE
   ========================================================================= */
.gkt-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0D2235 0%, #061520 100%);
    border: 2px solid #1E5080;
    border-radius: 50px;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.gkt-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.5);
}
.gkt-mini-icon { font-size: 24px; }
.gkt-mini-time {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #60B8F0;
}
.gkt-mini-badge {
    background: #DC3545;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
}

/* =========================================================================
   EXPANDED OVERLAY
   Solid opaque background. Grill marks via ::before pseudo-element.
   ========================================================================= */
.gkt-overlay {
    position: relative;
    width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    background: #071828;
    border: 1px solid #1E5080;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    isolation: isolate;
}

.gkt-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 18px,
        rgba(0,0,0,0.06) 18px,
        rgba(0,0,0,0.06) 20px
    );
}

.gkt-overlay > * {
    position: relative;
    z-index: 1;
}

.gkt-overlay::-webkit-scrollbar { width: 6px; }
.gkt-overlay::-webkit-scrollbar-track { background: transparent; }
.gkt-overlay::-webkit-scrollbar-thumb { background: #1E5080; border-radius: 3px; }

/* =========================================================================
   HEADER
   ========================================================================= */
.gkt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(30,80,128,0.4);
    background: #0D2235;
    border-radius: 16px 16px 0 0;
}
.gkt-logo {
    font-size: 15px;
    font-weight: 700;
    color: #60B8F0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.gkt-close {
    background: none;
    border: none;
    color: #5A8CAA;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}
.gkt-close:hover { color: #60B8F0; }

/* =========================================================================
   DETECTED INGREDIENTS
   ========================================================================= */
.gkt-detected {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(30,80,128,0.3);
}
.gkt-detected-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #5A8CAA;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.gkt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gkt-chip {
    background: rgba(96,184,240,0.15);
    border: 1px solid rgba(96,184,240,0.3);
    color: #60B8F0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.gkt-chip:hover {
    background: rgba(96,184,240,0.3);
    transform: translateY(-1px);
}

/* =========================================================================
   QUICK START
   ========================================================================= */
.gkt-quickstart {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(30,80,128,0.3);
}
.gkt-section-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #5A8CAA;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.gkt-quick-btn {
    display: inline-block;
    background: rgba(30,80,128,0.25);
    border: 1px solid rgba(96,184,240,0.4);
    color: #7ECEF5;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 0 6px 6px 0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.gkt-quick-btn:hover {
    background: rgba(96,184,240,0.3);
    transform: translateY(-1px);
}

/* =========================================================================
   PROTEIN GRID
   ========================================================================= */
.gkt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
}
.gkt-grid-methods { grid-template-columns: repeat(2, 1fr); }
.gkt-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(30,80,128,0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #C8E0F4;
}
.gkt-grid-btn:hover {
    background: rgba(96,184,240,0.12);
    border-color: #60B8F0;
    transform: translateY(-2px);
}
.gkt-grid-icon { font-size: 28px; }
.gkt-grid-label { font-size: 12px; font-weight: 600; text-align: center; }

/* =========================================================================
   CUT LIST
   ========================================================================= */
.gkt-list {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gkt-list-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(30,80,128,0.3);
    border-radius: 8px;
    color: #C8E0F4;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}
.gkt-list-btn:hover {
    background: rgba(96,184,240,0.1);
    border-color: #60B8F0;
    padding-left: 18px;
}

/* =========================================================================
   DONENESS
   ========================================================================= */
.gkt-doneness-list {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gkt-doneness-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(30,80,128,0.3);
    border-radius: 8px;
    color: #C8E0F4;
    cursor: pointer;
    transition: all 0.2s;
}
.gkt-doneness-btn:hover {
    background: rgba(96,184,240,0.1);
}
.gkt-doneness-name { font-weight: 600; font-size: 13px; }

/* =========================================================================
   STEP HEADER / BACK
   ========================================================================= */
.gkt-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30,80,128,0.2);
    font-weight: 600;
    font-size: 14px;
}
.gkt-back {
    background: none;
    border: 1px solid rgba(30,80,128,0.3);
    color: #5A8CAA;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
}
.gkt-back:hover { color: #60B8F0; border-color: #60B8F0; }

/* =========================================================================
   CONFIRM STEP
   ========================================================================= */
.gkt-confirm {
    padding: 16px;
}
.gkt-confirm-item {
    margin-bottom: 6px;
    font-size: 13px;
}
.gkt-confirm-item strong { color: #5A8CAA; }
.gkt-confirm-loading {
    margin-top: 12px;
    color: #5A8CAA;
    font-style: italic;
}
.gkt-match {
    margin-top: 8px;
    background: rgba(96,184,240,0.08);
    border: 1px solid rgba(96,184,240,0.2);
    border-radius: 8px;
    padding: 12px;
}
.gkt-match-time {
    font-size: 18px;
    font-weight: 700;
    color: #60B8F0;
    margin-bottom: 6px;
}
.gkt-match-temp { color: #60B8F0; margin-bottom: 6px; font-size: 13px; }
.gkt-match-instr { font-size: 12px; margin-bottom: 6px; color: #A0C4DC; }
.gkt-match-tips { font-size: 12px; color: #5A8CAA; font-style: italic; }
.gkt-no-match { color: #5A8CAA; font-style: italic; font-size: 13px; }

.gkt-start-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 12px 16px 16px;
    padding: 16px;
    background: linear-gradient(135deg, #DC3545 0%, #B02A37 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.gkt-start-btn:hover {
    background: linear-gradient(135deg, #E04050 0%, #C03040 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220,53,69,0.4);
}

/* =========================================================================
   ACTIVE TIMER CARDS
   ========================================================================= */
.gkt-active-timers {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid rgba(30,80,128,0.3);
}
.gkt-timer-card {
    background: rgba(0,0,0,0.35);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(30,80,128,0.3);
}
.gkt-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.gkt-timer-name {
    font-weight: 700;
    font-size: 14px;
}
.gkt-timer-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
}
.gkt-timer-remove:hover { color: #DC3545; }

.gkt-timer-display {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 8px;
}
.gkt-ring { width: 100%; height: 100%; }
.gkt-timer-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #60B8F0;
    text-shadow: 0 0 10px rgba(96,184,240,0.3);
}

.gkt-timer-phase {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #5A8CAA;
}
.gkt-phase-flip {
    color: #FF4500 !important;
    font-size: 16px !important;
    animation: gkt-pulse 0.5s ease-in-out infinite;
}
.gkt-timer-temp {
    text-align: center;
    font-size: 12px;
    color: #60B8F0;
    margin-bottom: 8px;
}

.gkt-timer-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.gkt-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(30,80,128,0.3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #C8E0F4;
    background: rgba(255,255,255,0.05);
}
.gkt-btn:hover { background: rgba(255,255,255,0.1); }
.gkt-btn-pause { border-color: #7ECEF5; color: #7ECEF5; }
.gkt-btn-play { border-color: #28A745; color: #28A745; }
.gkt-btn-add { border-color: #6C757D; color: #AAA; }
.gkt-btn-cancel { border-color: #DC3545; color: #DC3545; }

.gkt-timer-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(30,80,128,0.2);
    font-size: 11px;
    color: #5A8CAA;
    text-align: center;
}

/* =========================================================================
   FLASH / PULSE ANIMATIONS
   ========================================================================= */
@keyframes gkt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.gkt-flash {
    animation: gkt-card-flash 0.5s ease-in-out 5;
}
@keyframes gkt-card-flash {
    0%, 100% { background: rgba(0,0,0,0.3); }
    50% { background: rgba(255,69,0,0.3); }
}
.gkt-done {
    border-color: #28A745 !important;
    background: rgba(40,167,69,0.1);
}

/* =========================================================================
   MOBILE RESPONSIVE
   ========================================================================= */
@media (max-width: 480px) {
    /* Mini/collapsed button — pin to top-right, avoid transform centering */
    .gkt-root.gkt-collapsed {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
    }
    /* Expanded panel — full-width bottom sheet */
    .gkt-root.gkt-expanded {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: auto !important;
        transform: none !important;
    }
    .gkt-overlay {
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
    }
    .gkt-grid { grid-template-columns: repeat(3, 1fr); }
}
