/* =========================================================
   ATHERIOT TRAVEL - YOU PAGE
========================================================= */


/* =========================================================
   GLOBAL THEME VARIABLES
========================================================= */

:root {

    --primary: #007bff;
    --primary-hover: #0069d9;

    --background: #f5f7fb;
    --surface: #ffffff;
    --surface-hover: #f8fbff;

    --text: #333333;
    --muted: #666666;

    --border: #e5e5e5;

    --icon-background: rgba(0, 123, 255, 0.10);

    --content-width: 1024px;

    --radius: 8px;

    --shadow:
        0 4px 12px rgba(0, 0, 0, 0.06);

}


/* =========================================================
   DARK THEME
========================================================= */

body.dark {

    --background: #121212;

    --surface: #1e1e1e;

    --surface-hover: #252525;

    --text: #f5f5f5;

    --muted: #aaaaaa;

    --border: #333333;

    --icon-background:
        rgba(0, 123, 255, 0.18);

    --shadow:
        0 4px 12px rgba(0, 0, 0, 0.30);

}


/* =========================================================
   SYSTEM THEME

   Used when theme.js adds "system"
========================================================= */

@media (prefers-color-scheme: dark) {

    body.system {

        --background: #121212;

        --surface: #1e1e1e;

        --surface-hover: #252525;

        --text: #f5f5f5;

        --muted: #aaaaaa;

        --border: #333333;

        --icon-background:
            rgba(0, 123, 255, 0.18);

        --shadow:
            0 4px 12px rgba(0, 0, 0, 0.30);

    }

}


/* =========================================================
   GLOBAL RESET
========================================================= */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


html {

    width: 100%;

    min-height: 100%;

    overflow-x: hidden;

}


/* =========================================================
   BODY
========================================================= */

body {

    width: 100%;

    min-height: 100vh;

    overflow-x: hidden;

    background: var(--background);

    font-family:
        "Roboto",
        "Noto Sans",
        Arial,
        sans-serif;

    color: var(--text);

    padding-bottom: 110px;

    transition:
        background 0.25s ease,
        color 0.25s ease;

}


/* =========================================================
   PAGE CONTAINER
========================================================= */

.you-page {

    width: min(calc(100% - 40px),
            var(--content-width));

    margin: 20px auto;

}


/* =========================================================
   YOU HEADER
========================================================= */

.you-header {

    width: 100%;

    padding:
        clamp(18px, 3vw, 25px) clamp(15px, 3vw, 30px);

    background: var(--primary);

    color: #ffffff;

    border-radius: var(--radius);

    box-shadow:
        0 4px 12px rgba(0, 123, 255, 0.12);

}


/* =========================================================
   HEADER CONTENT
========================================================= */

.you-header-content {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

}


/* =========================================================
   HEADER TEXT
========================================================= */

.you-header-text {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

}


/* =========================================================
   YOU ICON
========================================================= */

.you-icon {

    position: absolute;

    top: 2px;

    right: 50%;

    transform:
        translateX(-38px);

    display: inline-flex;

    align-items: center;

    justify-content: center;

    color: #ffffff;

    font-size:
        clamp(1.5rem, 3vw, 1.9rem);

    line-height: 1;

}


/* =========================================================
   HEADER TITLE
========================================================= */

.you-header h1 {

    margin: 0;

    color: #ffffff;

    font-size:
        clamp(1.7rem, 4vw, 2.2rem);

    font-weight: 700;

    line-height: 1.1;

    text-align: center;

}


/* =========================================================
   HEADER DESCRIPTION
========================================================= */

.you-header p {

    margin-top: 8px;

    color: rgba(255, 255, 255, 0.95);

    font-size:
        clamp(0.85rem, 2vw, 1rem);

    font-weight: 400;

    line-height: 1.4;

    text-align: center;

}


/* =========================================================
   SETTINGS SECTION
========================================================= */

.settings-section {

    margin-top: 22px;

}


/* =========================================================
   SECTION TITLE
========================================================= */

.section-title {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 14px;

    padding-bottom: 14px;

    border-bottom:
        1px solid var(--border);

    color: var(--text);

    font-size:
        clamp(1.2rem, 3vw, 1.5rem);

    font-weight: 700;

}


.section-title i {

    color: var(--primary);

}


/* =========================================================
   SETTINGS CARD
========================================================= */

.settings-card {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding:
        clamp(15px, 3vw, 20px);

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    transition:
        background 0.25s ease,
        border-color 0.25s ease;

}


/* =========================================================
   SPACE BETWEEN CARDS
========================================================= */

.settings-card+.settings-card {

    margin-top: 12px;

}


/* =========================================================
   SETTING INFORMATION
========================================================= */

.setting-info {

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 14px;

}


/* =========================================================
   SETTING ICON
========================================================= */

.setting-icon {

    width: 44px;

    height: 44px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        var(--icon-background);

    color: var(--primary);

    border-radius: 8px;

    font-size: 18px;

}


/* =========================================================
   SETTING TEXT
========================================================= */

.setting-text {

    min-width: 0;

}


.setting-text h3 {

    margin-bottom: 5px;

    font-size: 17px;

    font-weight: 600;

    color: var(--text);

}


.setting-text p {

    font-size: 14px;

    line-height: 1.4;

    color: var(--muted);

    overflow-wrap: break-word;

}


/* =========================================================
   PRIMARY BUTTONS
========================================================= */

.edit-button,

.save-button {

    flex-shrink: 0;

    border: none;

    border-radius: 7px;

    padding: 9px 16px;

    background: var(--primary);

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 500;

    cursor: pointer;

    transition:

        background 0.2s ease,

        transform 0.2s ease;

}


.edit-button:hover,

.save-button:hover {

    background: var(--primary-hover);

}


.edit-button:active,

.save-button:active {

    transform: scale(0.97);

}


/* =========================================================
   EDIT NAME CONTAINER
========================================================= */

.edit-name-container {

    width: 100%;

    margin-top: 12px;

    padding: 16px;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.04);

}


/* =========================================================
   NAME / EMAIL INPUT
========================================================= */

.edit-name-container input {

    width: 100%;

    min-height: 45px;

    padding: 12px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background: var(--surface);

    color: var(--text);

    font-family: inherit;

    font-size: 15px;

    outline: none;

    transition:

        background 0.25s ease,

        color 0.25s ease,

        border-color 0.2s ease,

        box-shadow 0.2s ease;

}


.edit-name-container input:focus {

    border-color: var(--primary);

    box-shadow:

        0 0 0 3px rgba(0, 123, 255, 0.10);

}


/* =========================================================
   EDIT ACTIONS
========================================================= */

.edit-actions {

    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 12px;

}


/* =========================================================
   CANCEL BUTTON
========================================================= */

.cancel-button {

    padding: 9px 16px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background: var(--surface);

    color: var(--text);

    font-family: inherit;

    font-size: 14px;

    cursor: pointer;

    transition:

        background 0.2s ease,

        border-color 0.2s ease;

}


.cancel-button:hover {

    background: var(--surface-hover);

    border-color: var(--primary);

}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {

    display: none !important;

}


/* =========================================
   THEME TOGGLE
========================================= */

.theme-toggle {
    flex-shrink: 0;
    cursor: pointer;
}

.theme-toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    display: block;

    width: 55px;
    height: 30px;

    background: #d1d5db;
    border-radius: 50px;

    cursor: pointer;

    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: "";

    position: absolute;

    width: 24px;
    height: 24px;

    top: 3px;
    left: 3px;

    background: white;
    border-radius: 50%;

    transition: transform 0.25s ease;
}

/* Dark mode position */

.theme-toggle input:checked+.toggle-slider {
    background: var(--primary);
}

.theme-toggle input:checked+.toggle-slider::before {
    transform: translateX(25px);
}


/* =========================================================
   OPTION
========================================================= */

#themeSelect option {

    background: var(--surface);

    color: var(--text);

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .section-title {

        font-size: 22px;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    body {

        padding-bottom: 100px;

    }


    /* =====================================
       PAGE
    ===================================== */

    .you-page {

        width:
            calc(100% - 24px);

        margin:
            12px auto;

    }


    /* =====================================
       HEADER
    ===================================== */

    .you-header {

        padding:
            18px 15px;

    }


    .you-icon {

        font-size: 25px;

        top: 2px;

        transform:
            translateX(-34px);

    }


    .you-header h1 {

        font-size: 1.8rem;

    }


    .you-header p {

        margin-top: 8px;

        font-size: 0.9rem;

    }


    /* =====================================
       SETTINGS
    ===================================== */

    .settings-section {

        margin-top: 20px;

    }


    .section-title {

        margin-bottom: 14px;

        padding-bottom: 12px;

        font-size: 20px;

    }


    /* =====================================
       SETTINGS CARD
    ===================================== */

    .settings-card {

        gap: 12px;

        padding: 16px;

    }


    .setting-info {

        gap: 12px;

    }


    .setting-icon {

        width: 42px;

        height: 42px;

        font-size: 17px;

    }


    .setting-text h3 {

        font-size: 16px;

    }


    .setting-text p {

        font-size: 13px;

    }


    /* =====================================
       BUTTONS
    ===================================== */

    .edit-button,

    .save-button {

        padding: 9px 13px;

        font-size: 13px;

    }


    /* =====================================
       THEME
    ===================================== */

    #themeSelect {

        min-width: 105px;

        padding: 9px 8px;

        font-size: 13px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .you-page {

        width:
            calc(100% - 16px);

    }


    .you-header {

        padding:
            15px 12px;

    }


    .you-icon {

        font-size: 22px;

        transform:
            translateX(-30px);

    }


    .you-header h1 {

        font-size: 1.55rem;

    }


    .you-header p {

        font-size: 0.82rem;

    }


    .settings-card {

        padding: 14px;

        gap: 10px;

    }


    .setting-icon {

        width: 38px;

        height: 38px;

        font-size: 16px;

    }


    .setting-text h3 {

        font-size: 14px;

    }


    .setting-text p {

        font-size: 12px;

    }


    .edit-button,

    .save-button,

    .cancel-button {

        padding: 8px 10px;

        font-size: 12px;

    }


    #themeSelect {

        min-width: 90px;

        max-width: 100px;

        font-size: 12px;

    }

}


/* =========================================================
   KEYBOARD ACCESSIBILITY
========================================================= */

.edit-button:focus-visible,

.save-button:focus-visible,

.cancel-button:focus-visible,

#themeSelect:focus-visible {

    outline:

        3px solid rgba(0, 123, 255, 0.30);

    outline-offset: 3px;

}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,

    *::before,

    *::after {

        scroll-behavior: auto !important;

        transition-duration:
            0.01ms !important;

        animation-duration:
            0.01ms !important;

    }

}
 
/* Gap between setting cards */

.settings-card {
    margin-bottom: 12px;
}

/* =========================
   LEGAL CARDS
========================= */

.legal-card {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    margin-bottom: 12px;

    padding: 16px 20px;

    text-decoration: none;

    color: inherit;

    cursor: pointer;

}


/* Hover */

.legal-card:hover {

    background: var(--surface-hover);

}


/* Arrow */

.legal-card > i {

    flex-shrink: 0;

    margin-left: 15px;

    color: var(--muted);

}


/* Mobile */

@media (max-width: 600px) {

    .legal-card {

        padding: 16px;

        margin-bottom: 12px;

    }

}





/* HELP LINK */

.hourly-rate-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 8px;
    padding: 0;

    border: none;
    background: transparent;

    color: #087bff;
    font: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
    text-align: left;
}

.hourly-rate-help:hover {
    text-decoration: underline;
}

.hourly-rate-help:focus-visible {
    outline: 2px solid #087bff;
    outline-offset: 4px;
}

/* POPUP OVERLAY */

.hourly-popup {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.hourly-popup[hidden] {
    display: none !important;
}

/* POPUP CARD */

.hourly-popup-box {
    position: relative;

    width: 100%;
    max-width: 420px;
    max-height: 90dvh;
    overflow-y: auto;

    padding: 28px 22px;
    box-sizing: border-box;

    background: var(--surface);
    color: var(--heading);

    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
}

.hourly-popup-box h3 {
    margin: 0 30px 10px 0;
    font-size: 20px;
}

.hourly-popup-description {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.75;
}

/* CLOSE BUTTON */

.hourly-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;

    background: transparent;
    border: none;
    color: var(--heading);

    font-size: 20px;
    cursor: pointer;
}

/* INPUTS */

.hourly-popup-box label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.hourly-popup-box input,
.hourly-popup-box select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;

    box-sizing: border-box;

    background: var(--surface);
    color: var(--heading);

    border: 1px solid var(--border);
    border-radius: 8px;

    font: inherit;
}

.hourly-input-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* RESULT */

.hourly-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 22px;
    padding: 16px;

    background: rgba(0,119,255,0.07);
    border-radius: 10px;
}

.hourly-result strong {
    color: #087bff;
    font-size: 21px;
}

/* APPLY BUTTON */

.hourly-use-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;

    background: #087bff;
    color: #fff;

    border: none;
    border-radius: 10px;

    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.hourly-use-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .hourly-popup-box {
        padding: 22px 16px;
    }

    .hourly-result strong {
        font-size: 18px;
    }
}