/* ========================================
   GLOBAL STYLES
========================================= */

:root {
    --primary: #8f596c;
    --primary-dark: #714354;
    --primary-light: #ead8df;

    --background: #f8f3f1;
    --surface: #ffffff;
    --surface-soft: #fdf9f7;

    --text-dark: #382c30;
    --text-medium: #74676c;
    --text-light: #9d9095;

    --border: #eadfe2;
    --success: #5f8b71;

    --shadow:
        0 12px 35px rgba(89, 58, 69, 0.12);

    --small-shadow:
        0 5px 18px rgba(89, 58, 69, 0.09);

    --radius-large: 28px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100svh;

    color: var(--text-dark);
    background:
        radial-gradient(
            circle at top left,
            rgba(234, 216, 223, 0.9),
            transparent 35%
        ),
        var(--background);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

input,
textarea {
    width: 100%;
}

textarea {
    resize: vertical;
}

[hidden] {
    display: none !important;
}


/* ========================================
   APPLICATION CONTAINER
========================================= */

.app-container {
    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 620px;
    min-height: 100svh;
    margin-inline: auto;

    background-color: var(--surface-soft);
}


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

.salon-header {
    display: flex;
    align-items: center;

    min-height: 76px;
    padding: 14px 20px;

    background-color: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
}

.salon-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    color: var(--text-dark);

    text-decoration: none;
}

.logo-icon {
    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;

    color: var(--surface);
    background:
        linear-gradient(
            145deg,
            #ae788c,
            var(--primary-dark)
        );

    border-radius: 50%;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-style: italic;

    box-shadow:
        0 5px 14px rgba(113, 67, 84, 0.25);
}

.logo-text {
    display: flex;
    flex-direction: column;

    line-height: 1.1;
}

.logo-text strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.logo-text small {
    margin-top: 4px;

    color: var(--text-medium);

    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}


/* ========================================
   MAIN SCREENS
========================================= */

main {
    display: flex;
    flex: 1;
}

.screen {
    width: 100%;
    padding: 30px 20px 42px;
}

.screen-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.back-button {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    color: var(--primary-dark);
    background-color: var(--surface);

    border: 1px solid var(--border);
    border-radius: 50%;

    font-size: 1.35rem;

    box-shadow: var(--small-shadow);
}

.back-button:hover {
    background-color: var(--primary-light);
}

.step-indicator {
    color: var(--text-medium);

    font-size: 0.85rem;
    font-weight: 600;
}

.screen-heading {
    margin-bottom: 26px;
}

.screen-heading h2 {
    margin-bottom: 8px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 9vw, 2.55rem);
    font-weight: 500;
    line-height: 1.1;
}

.screen-heading > p:last-child {
    color: var(--text-medium);
}

.eyebrow {
    margin-bottom: 10px;

    color: var(--primary);

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}


/* ========================================
   WELCOME SCREEN
========================================= */

.welcome-screen {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: calc(100svh - 76px);
    padding-top: 38px;

    overflow: hidden;
}

.welcome-screen::before {
    content: "";

    position: absolute;
    top: 110px;
    right: -75px;

    width: 210px;
    height: 210px;

    background-color: rgba(234, 216, 223, 0.45);
    border-radius: 50%;

    pointer-events: none;
}

.welcome-decoration {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    width: 170px;
    height: 170px;
    margin: 0 auto 34px;

    color: var(--primary);
    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--primary-light)
        );

    border: 1px solid rgba(143, 89, 108, 0.14);
    border-radius: 50%;

    box-shadow: var(--shadow);
}

.welcome-decoration span:nth-child(1),
.welcome-decoration span:nth-child(3) {
    font-size: 1rem;
}

.welcome-decoration span:nth-child(2) {
    font-size: 3.4rem;
}

.welcome-screen > .eyebrow,
.welcome-screen > h1,
.welcome-description {
    position: relative;
    z-index: 1;

    text-align: center;
}

.welcome-screen h1 {
    max-width: 480px;
    margin: 0 auto 18px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.45rem, 11vw, 3.7rem);
    font-weight: 500;
    line-height: 1.04;
}

.welcome-description {
    max-width: 420px;
    margin: 0 auto 28px;

    color: var(--text-medium);

    font-size: 1rem;
}

.welcome-screen .primary-button {
    position: relative;
    z-index: 1;

    margin-bottom: 34px;
}

.salon-details {
    position: relative;
    z-index: 1;

    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 15px;

    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
}

.detail-icon {
    display: grid;
    place-items: center;

    width: 42px;
    min-width: 42px;
    height: 42px;

    background-color: var(--primary-light);
    border-radius: 50%;
}

.detail-item div {
    display: flex;
    flex-direction: column;
}

.detail-item strong {
    margin-bottom: 2px;

    font-size: 0.88rem;
}

.detail-item span:last-child {
    color: var(--text-medium);

    font-size: 0.82rem;
}


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

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;

    border-radius: 999px;

    font-weight: 700;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-button {
    color: var(--surface);
    background-color: var(--primary);

    box-shadow:
        0 8px 20px rgba(143, 89, 108, 0.26);
}

.primary-button:hover:not(:disabled) {
    background-color: var(--primary-dark);

    transform: translateY(-2px);
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:disabled {
    color: var(--text-light);
    background-color: #e8e1e3;

    box-shadow: none;
}

.secondary-button {
    margin-top: 12px;
    padding: 16px 24px;

    color: var(--primary-dark);
    background-color: transparent;

    border: 2px solid var(--primary);
}

.secondary-button:hover {
    background-color: var(--primary-light);
}


/* ========================================
   SERVICE CARDS
========================================= */

.services-list {
    display: grid;
    gap: 14px;
}

.service-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;

    width: 100%;
    padding: 17px;

    color: var(--text-dark);
    background-color: var(--surface);

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

    text-align: left;

    box-shadow: var(--small-shadow);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.service-card:hover {
    border-color: var(--primary);

    box-shadow: var(--shadow);

    transform: translateY(-2px);
}

.service-icon {
    display: grid;
    place-items: center;

    width: 50px;
    height: 50px;

    background-color: var(--primary-light);
    border-radius: 50%;

    font-size: 1.45rem;
}

.service-information {
    display: flex;
    flex-direction: column;
}

.service-information strong {
    margin-bottom: 4px;

    font-size: 1rem;
}

.service-information span {
    color: var(--text-medium);

    font-size: 0.82rem;
}

.service-price {
    color: var(--primary-dark);

    font-size: 0.92rem;
    white-space: nowrap;
}


/* ========================================
   SELECTED SERVICE
========================================= */

.selected-service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 24px;
    padding: 17px;

    background-color: var(--primary-light);
    border-radius: var(--radius-medium);
}

.selected-service-card > div {
    display: flex;
    flex-direction: column;
}

.selected-service-card span {
    margin-bottom: 3px;

    color: var(--text-medium);

    font-size: 0.78rem;
}

.selected-service-details {
    align-items: flex-end;
}


/* ========================================
   FORM FIELDS
========================================= */

.booking-field {
    margin-bottom: 22px;
}

.booking-field label {
    display: block;

    margin-bottom: 8px;

    font-size: 0.9rem;
    font-weight: 700;
}

.booking-field input,
.booking-field textarea {
    padding: 14px 15px;

    color: var(--text-dark);
    background-color: var(--surface);

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

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.booking-field input {
    min-height: 52px;
}

.booking-field input:focus,
.booking-field textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(143, 89, 108, 0.11);
}

.booking-field input::placeholder,
.booking-field textarea::placeholder {
    color: var(--text-light);
}

.optional-label {
    color: var(--text-light);

    font-size: 0.75rem;
    font-weight: 500;
}


/* ========================================
   TIME SELECTION
========================================= */

.time-selection {
    margin-bottom: 26px;
}

.time-selection h3 {
    margin-bottom: 6px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 500;
}

.time-instruction {
    margin-bottom: 15px;

    color: var(--text-medium);

    font-size: 0.85rem;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.time-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;

    min-height: 55px;
    padding: 8px;

    color: var(--primary-dark);
    background-color: var(--surface);

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

    font-size: 0.9rem;
    font-weight: 700;
}

.time-slot:hover:not(:disabled) {
    border-color: var(--primary);

    transform: translateY(-1px);
}

.time-slot.selected {
    color: var(--surface);
    background-color: var(--primary);
    border-color: var(--primary);
}

.time-slot:disabled {
    color: var(--text-light);
    background-color: #eee8ea;
    border-color: #e4dadd;

    opacity: 0.75;
}

.time-slot:disabled span {
    text-decoration: line-through;
}

.time-slot small {
    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}


/* ========================================
   BOOKING SUMMARY
========================================= */

.booking-summary {
    margin-bottom: 26px;
    padding: 20px;

    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    box-shadow: var(--small-shadow);
}

.booking-summary h3 {
    margin-bottom: 15px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 500;
}

.summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding-block: 10px;

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

.summary-row:last-child {
    padding-bottom: 0;

    border-bottom: none;
}

.summary-row span {
    color: var(--text-medium);

    font-size: 0.88rem;
}

.summary-row strong {
    font-size: 0.88rem;

    text-align: right;
}

.booking-form-message {
    min-height: 22px;
    margin-bottom: 10px;

    color: #b4565b;

    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

/* ========================================
   CONFIRMATION SCREEN
========================================= */

.confirmation-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: calc(100svh - 76px);

    text-align: center;
}

.confirmation-icon {
    display: grid;
    place-items: center;

    width: 82px;
    height: 82px;
    margin: 0 auto 24px;

    color: var(--surface);
    background-color: var(--success);
    border-radius: 50%;

    font-size: 2.4rem;

    box-shadow:
        0 8px 24px rgba(95, 139, 113, 0.25);
}

.confirmation-screen h2 {
    margin-bottom: 12px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 9vw, 2.7rem);
    font-weight: 500;
    line-height: 1.1;
}

.confirmation-message {
    max-width: 420px;
    margin: 0 auto 25px;

    color: var(--text-medium);
}

.confirmation-summary {
    width: 100%;

    text-align: left;
}


/* ========================================
   FOOTER
========================================= */

.salon-footer {
    padding: 20px;

    color: var(--text-light);

    font-size: 0.75rem;
    text-align: center;
}

.salon-footer a {
    display: inline-block;
    margin-top: 6px;

    color: var(--primary-dark);

    font-weight: 600;
}


/* ========================================
   DESKTOP
========================================= */

@media (min-width: 621px) {
    body {
        padding-block: 30px;
    }

    .app-container {
        min-height: calc(100svh - 60px);

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

        box-shadow: var(--shadow);

        overflow: hidden;
    }

    .welcome-screen,
    .confirmation-screen {
        min-height: auto;
    }

    .screen {
        padding-inline: 38px;
    }

    .salon-header {
        padding-inline: 38px;
    }

    .salon-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card {
        padding: 19px;
    }

    .time-slots {
        grid-template-columns: repeat(4, 1fr);
    }
}

.my-appointments-screen h2 {
    margin-top: 12px;
}

#customer-appointments-list {
    margin-top: 28px;
}

.customer-appointments-empty {
    padding: 24px;
    border: 1px solid #eadde1;
    border-radius: 20px;
    background-color: #ffffff;
    color: #786b70;
    text-align: center;
}

.customer-appointment-card {
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid #eadde1;
    border-radius: 22px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px
        rgba(91, 54, 68, 0.08);
}

.customer-appointment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.customer-appointment-header h3 {
    margin: 0;
    color: #3d2d33;
}

.customer-appointment-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: #f1e1e7;
    color: #7d4358;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-completed {
    background-color: #e3f2e8;
    color: #39714d;
}

.status-cancelled {
    background-color: #f1eded;
    color: #8a7777;
}

.customer-appointment-detail {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0;
    color: #786b70;
}

.customer-appointment-detail strong {
    color: #3d2d33;
    text-align: right;
}

.customer-appointments-message {
    min-height: 24px;
    margin-top: 12px;
    color: #39714d;
    font-weight: 700;
}

.cancel-appointment-button {
    width: 100%;
    margin-top: 16px;
    padding: 12px 18px;
    border: 1px solid #b85c69;
    border-radius: 999px;
    background-color: transparent;
    color: #a34755;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cancel-appointment-button:hover {
    background-color: #fff0f2;
}

.cancel-appointment-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.customer-appointments-group {
    margin-top: 28px;
}

.customer-appointments-group:first-child {
    margin-top: 0;
}

.customer-appointments-group-title {
    margin: 0 0 16px;
    color: #3d2d33;
    font-size: 1.25rem;
}

.status-past {
    background-color: #eeeeee;
    color: #716a6d;
}

.location-section {
    width: 100%;
    margin-top: 40px;
}

.location-section h2 {
    margin: 8px 0 20px;
    color: #3d2d33;
}

.map-container {
    width: 100%;
    overflow: hidden;
    border: 1px solid #eadde1;
    border-radius: 24px;
    background-color: #ffffff;
    box-shadow: 0 12px 30px
        rgba(91, 54, 68, 0.1);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
}

.map-link {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 15px 20px;
    border: 2px solid #9b5c72;
    border-radius: 999px;
    color: #7d4358;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.map-link:hover {
    background-color: #f3e4e9;
}

@media (min-width: 768px) {
    .map-container iframe {
        height: 360px;
    }
}

.booking-privacy-notice {
    margin-bottom: 18px;

    color: var(--text-medium);

    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.booking-privacy-notice a {
    color: var(--primary-dark);
    font-weight: 700;
}

.privacy-page {
    width: 100%;
    padding: 30px 20px 50px;
}

.privacy-back-link {
    display: inline-block;
    margin-bottom: 32px;

    color: var(--primary-dark);

    font-weight: 700;
    text-decoration: none;
}

.privacy-page h1 {
    margin-bottom: 18px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 10vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
}

.privacy-introduction {
    margin-bottom: 32px;

    color: var(--text-medium);
}

.privacy-page section {
    margin-top: 28px;
}

.privacy-page h2 {
    margin-bottom: 10px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 500;
}

.privacy-page p,
.privacy-page li {
    color: var(--text-medium);
}

.privacy-page section p + p {
    margin-top: 12px;
}

.privacy-page ul {
    margin: 0 0 14px 20px;
}

.privacy-page li + li {
    margin-top: 5px;
}

@media (min-width: 621px) {
    .privacy-page {
        padding-inline: 38px;
    }
}