/**
 * DasSchmecktuns.de - Kochmodus Styles
 */

/* ========================================
   COOK MODE OVERLAY
   ======================================== */
.cook-mode-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cook-mode-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cook-mode-container {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    overflow: hidden;
}

@media (min-width: 768px) {
    .cook-mode-container {
        height: auto;
        max-height: 90vh;
        border-radius: 24px;
        margin: 20px;
    }
}

/* Header */
.cook-mode-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cook-mode-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cook-mode-close:hover {
    background: rgba(255,255,255,0.3);
}

.cook-mode-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.cook-mode-icon {
    font-size: 28px;
}

.cook-mode-progress {
    margin-left: auto;
    text-align: right;
}

.cook-mode-progress-text {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 6px;
    display: block;
}

.cook-mode-progress-bar {
    width: 150px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.cook-mode-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Content */
.cook-mode-content {
    flex: 1;
    padding: 40px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cook-mode-content.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cook-mode-step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(232, 168, 124, 0.4);
}

.cook-mode-step-number .step-num {
    font-size: 36px;
    font-weight: 800;
}

.cook-mode-step-text {
    font-size: 24px;
    line-height: 1.6;
    color: var(--color-text);
    max-width: 600px;
    margin-bottom: 24px;
}

.cook-mode-step-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--color-warning);
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: left;
    max-width: 500px;
}

.cook-mode-step-tip .tip-icon {
    font-size: 24px;
}

.cook-mode-step-timer {
    display: flex;
    justify-content: center;
}

/* Timer in Cook Mode */
.cook-mode-timer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--color-bg-highlight);
    border-radius: 20px;
    transition: all 0.3s;
}

.cook-mode-timer.running {
    background: var(--color-primary);
}

.cook-mode-timer.finished {
    background: var(--color-success);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.cook-mode-timer .timer-display {
    font-size: 48px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text);
    min-width: 120px;
}

.cook-mode-timer.running .timer-display,
.cook-mode-timer.finished .timer-display {
    color: white;
}

.cook-mode-timer .timer-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.cook-mode-timer .timer-btn:hover {
    transform: scale(1.1);
}

.cook-mode-timer.running .timer-btn,
.cook-mode-timer.finished .timer-btn {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* Footer */
.cook-mode-footer {
    padding: 20px 24px;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-bg-highlight);
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cook-mode-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.cook-mode-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cook-mode-prev {
    background: var(--color-bg-highlight);
    color: var(--color-text);
}

.cook-mode-prev:hover:not(:disabled) {
    background: var(--color-bg);
}

.cook-mode-next {
    background: var(--color-primary);
    color: white;
}

.cook-mode-next:hover {
    background: var(--color-primary-dark);
}

.cook-mode-next.finish {
    background: var(--color-success);
}

.cook-mode-done {
    background: var(--color-bg-highlight);
    color: var(--color-text);
}

.cook-mode-done.completed {
    background: var(--color-success);
    color: white;
}

/* Completion Screen */
.cook-mode-complete {
    text-align: center;
    padding: 40px;
}

.cook-mode-complete .complete-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.cook-mode-complete h2 {
    font-size: 32px;
    color: var(--color-text);
    margin-bottom: 12px;
}

.cook-mode-complete p {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.cook-mode-complete .complete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cook-mode-complete .cook-mode-btn.secondary {
    background: var(--color-bg-highlight);
    color: var(--color-text);
}

/* ========================================
   RECIPE STEPS WITH CHECKBOXES
   ======================================== */
.recipe-step {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-bg-highlight);
    transition: opacity 0.3s;
}

.recipe-step.completed {
    opacity: 0.5;
}

.recipe-step.completed .step-text {
    text-decoration: line-through;
}

.step-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.step-checkbox {
    width: 24px;
    height: 24px;
    accent-color: var(--color-success);
    cursor: pointer;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.recipe-step.completed .step-number {
    background: var(--color-success);
}

.step-content {
    flex: 1;
}

.step-text {
    line-height: 1.7;
    color: var(--color-text);
}

.step-tip {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--color-warning);
    border-radius: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
}

.step-timer {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--color-bg-highlight);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.step-timer.running {
    background: var(--color-primary);
}

.step-timer.finished {
    background: var(--color-success);
}

.step-timer .timer-display {
    font-size: 20px;
    font-weight: 700;
    font-family: monospace;
    min-width: 60px;
}

.step-timer.running .timer-display,
.step-timer.finished .timer-display {
    color: white;
}

.step-timer .timer-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-timer.running .timer-btn,
.step-timer.finished .timer-btn {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* ========================================
   COOK MODE START BUTTON
   ======================================== */
.cook-mode-start-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(232, 168, 124, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cook-mode-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(232, 168, 124, 0.5);
}

.cook-mode-start-btn .btn-icon {
    font-size: 24px;
}

/* ========================================
   COMMENT HELPFUL BUTTON
   ======================================== */
.comment-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-bg-highlight);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.comment-helpful-btn:hover {
    background: var(--color-primary);
    color: white;
}

.comment-helpful-btn.liked {
    background: var(--color-primary);
    color: white;
}

.comment-helpful-btn .helpful-count {
    font-weight: 600;
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-bg-highlight);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }
    
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--color-primary);
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-item.create {
    position: relative;
    margin-top: -20px;
}

.mobile-nav-item.create .nav-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(232, 168, 124, 0.4);
}

.mobile-nav-item.create svg {
    color: white;
}

/* ========================================
   PROGRESS TRACKER (Steps Done)
   ======================================== */
.steps-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--color-bg-highlight);
    border-radius: 12px;
    margin-bottom: 20px;
}

.steps-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
}

.steps-progress-fill {
    height: 100%;
    background: var(--color-success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.steps-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}
