/* MakeCookbook Public Website Styles */

/* CSS Custom Properties - Color System */
:root {
    /* Static colours - Wagtail naming convention with HSL for auto dark mode */
    --w-color-black: hsl(0 0% 0%);
    --w-color-grey-800: hsl(220 13% 13%);      /* Dark slate for panels */
    --w-color-grey-700: hsl(215 16% 21%);      /* Panels in dark theme */
    --w-color-grey-600: hsl(215 16% 35%);      /* Body copy, user content */
    --w-color-grey-500: hsl(215 16% 45%);      /* Panels, dividers */
    --w-color-grey-400: hsl(215 16% 60%);      /* Help text, placeholders */
    --w-color-grey-200: hsl(220 13% 91%);      /* Dividers, button borders */
    --w-color-grey-150: hsl(220 13% 94%);      /* Field borders */
    --w-color-grey-100: hsl(220 13% 95%);      /* Dividers, panel borders */
    --w-color-grey-50: hsl(220 13% 98%);       /* Background for panels */
    --w-color-white: hsl(0 0% 100%);           /* Page backgrounds */
    
    /* Brand colors - dark slate primary, orange secondary */
    --w-color-primary: hsl(220 13% 13%);       /* Dark slate for branding */
    --w-color-primary-200: hsl(215 16% 21%);   /* Lighter slate accent */
    
    --w-color-secondary: hsl(22 93% 53%);      /* Orange for CTAs */
    --w-color-secondary-600: hsl(22 90% 48%);  /* Darker orange for hover */
    --w-color-secondary-400: hsl(22 95% 61%);  /* Mid orange */
    --w-color-secondary-100: hsl(24 100% 93%); /* Light orange */
    --w-color-secondary-75: hsl(24 100% 86%);  /* Lighter orange */
    --w-color-secondary-50: hsl(45 97% 88%);   /* Lightest orange/cream */
    
    /* Info color - blue */
    --w-color-info-125: hsl(200 92% 86%);
    --w-color-info-100: hsl(199 89% 39%);
    --w-color-info-75: hsl(199 95% 61%);
    --w-color-info-50: hsl(199 89% 92%);
    
    /* Positive color - green */
    --w-color-positive-100: hsl(142 71% 35%);
    --w-color-positive-50: hsl(138 77% 92%);
    
    /* Warning color - yellow */
    --w-color-warning-100: hsl(45 93% 47%);
    --w-color-warning-75: hsl(45 93% 63%);
    --w-color-warning-50: hsl(45 93% 88%);
    
    /* Critical color - red */
    --w-color-critical-200: hsl(0 72% 51%);
    --w-color-critical-100: hsl(0 84% 60%);
    --w-color-critical-50: hsl(0 86% 94%);
}


/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--w-color-grey-600);
    background: var(--w-color-white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background: var(--w-color-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--w-color-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--w-color-grey-600);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--w-color-secondary);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--w-color-secondary);
    color: var(--w-color-white);
}

.btn-primary:hover {
    background: var(--w-color-secondary-600);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-white {
    background: var(--w-color-white);
    color: var(--w-color-secondary);
    font-weight: bold;
}

.btn-white:hover {
    background: var(--w-color-grey-50);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-gray {
    background: var(--w-color-grey-50);
}

.section-amber {
    background: var(--w-color-secondary-50);
}

/* Heading styles - using !important to override Tailwind's reset */
h1, h2, h3, h4, h5, h6 {
    color: var(--w-color-primary) !important;
    font-weight: 700 !important;
}

h1 {
    font-size: 3rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
}

h2 {
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 3rem !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
}

/* Footer */
footer {
    background: var(--w-color-grey-800);
    color: var(--w-color-grey-400);
    text-align: center;
    padding: 2rem 0;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--w-color-grey-400);
    text-decoration: none;
}

footer a:hover {
    color: var(--w-color-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--w-color-white);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-container {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
    }

    h1 {
        font-size: 1.875rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    section {
        padding: 3rem 0;
    }
}


/* Cookie consent banner styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.cookie-consent-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cookie-consent-btn-accept-all {
    background: #27ae60;
    color: white;
}

.cookie-consent-btn-accept-all:hover {
    background: #229954;
}

.cookie-consent-btn-essential {
    background: #95a5a6;
    color: white;
}

.cookie-consent-btn-essential:hover {
    background: #7f8c8d;
}

.cookie-consent-btn-settings {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-consent-btn-settings:hover {
    background: rgba(255,255,255,0.1);
}

/* Cookie settings modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    color: #333;
}

.cookie-settings-header {
    margin-bottom: 20px;
}

.cookie-settings-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.cookie-category {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.cookie-category p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #27ae60;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}


@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent-btn {
        flex: 1;
    }
}