/* Import the fonts we will use */
@import url('https://fonts.googleapis.com/css2?family=Merriweather&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair Display&display=swap');


/* lato-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/lato-v24-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
    --primary-color: #8c5e59;        /* warm earthy tone */
    --primary-hover: #734c46;
    --background-color: #faf7f2;     /* soft cream */
    --form-background: #ffffff;
    --text-color: #2c3e50;
    --label-color: #5a4a44;
    --border-color: #d9cfc8;
    --error-color: #dc3545;
    --success-color: #28a745;
}

/* === Global === */
body {
    font-family: 'Lato', 'Georgia', serif; /* Use Lato as primary, Georgia as fallback */
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 1rem; /* Mobile-first padding */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top on mobile for better scroll */
    min-height: 100vh;
    font-size: 16px; /* Slightly smaller base for mobile */
    line-height: 1.6;
}

.container {
    max-width: 680px;
    width: 100%;
}

/* === Header === */
.page-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem; /* Reduced padding for mobile */
    background: #fdf8f2;
    border: 1.5px solid #e0d7c6;
    border-radius: 14px;
    margin-bottom: 1.5rem; /* Reduced margin */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.page-header .header-icon {
    width: 40px; /* Smaller icon for mobile */
    height: 40px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.page-header .header-content h1 {
    font-family: "Merriweather","Playfair Display","Georgia", serif;
    font-size: 1.5rem; /* More compact heading for mobile */
    font-weight: bold;
    margin: 0 0 0.15rem 0;
    color: #5a3e36;
    line-height: 1.2;
}

.page-header .header-content .subtitle {
    font-family: 'Lato', 'Georgia', serif;
    font-size: 0.95rem; /* More compact subtitle */
    color: #6c5f68;
    margin: 0;
    line-height: 1.4;
}

/* === Form Container === */
.form-container {
    background-color: var(--form-background);
    padding: 1.5rem; /* Reduced padding for mobile */
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* === Form Elements === */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--label-color);
    font-size: 0.95rem; /* Smaller labels for mobile */
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Lato', 'Georgia', serif;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fffdfb;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(140, 94, 89, 0.15);
}

textarea {
    resize: vertical;
}

small {
    display: block;
    margin-top: 0.35rem;
    color: #7d6f65;
    font-size: 0.9rem;
}

/* === Radio & Checkboxes === */
.scheduling-options {
    display: flex;
    gap: 1.5rem;
}

.radio-group, .checkbox-option {
    display: flex;
    align-items: center;
}

.radio-group input,
.checkbox-option input {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

/* === Recurring Section === */
#recurring-options {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-top: 1rem;
}

/* === AI Assistant === */
.ai-prompt-container {
    background: #faf3ef;
    border: 1px solid #e8d8d2;
    padding: 1rem;
    border-radius: 10px;
}

.ai-generate-button {
    margin-top: 1rem;
    padding: 0.8rem;
    font-size: 1rem;
}

/* === Summary Section === */
.price-summary {
    background-color: #fdf8f2;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

.price-summary h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: #5a3e36;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    color: var(--label-color);
    font-size: 0.95rem;
}

.price-item.total span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* === Error Box === */
.error {
    color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.08);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    display: none;
}

/* === Buttons === */
button {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:disabled {
    background-color: #d3b8b6;
    cursor: not-allowed;
    opacity: 0.7;
}

button:not(:disabled):hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === Thank You Section === */
#thank-you-message {
    text-align: center;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

#thank-you-message h2 {
    font-size: 1.6rem;
    color: var(--success-color);
}

/* === Terms Section === */
.terms-and-conditions {
    display: flex;
    align-items: flex-start;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.terms-and-conditions input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.2rem;
    transform: scale(1.2);
}

.terms-and-conditions label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--label-color);
    line-height: 1.5;
}

.terms-and-conditions a {
    color: var(--primary-color);
    text-decoration: underline;
}
.terms-and-conditions a:hover {
    text-decoration: none;
}

/* === CRITICAL UTILITY CLASSES === */
.hidden {
    display: none !important;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================================================= */
/* === Responsive Design (Scaling UP for larger screens) === */
/* ======================================================= */

/* Media Query for tablets and larger screens (e.g., > 768px) */
@media (min-width: 768px) {
    body {
        padding: 2rem 1rem;
        font-size: 17px;
        align-items: center;
    }

    .page-header {
        padding: 2rem;
    }

    .page-header .header-icon {
        width: 55px;
        height: 55px;
        margin-right: 1.5rem;
    }

    .page-header .header-content h1 {
        font-size: 2.25rem;
    }

    .page-header .header-content .subtitle {
        font-size: 1.1rem;
    }

    .form-container {
        padding: 2.5rem;
    }
    
    label {
        font-size: 1rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="date"],
    textarea,
    select {
        padding: 0.85rem 1rem;
        border-radius: 10px;
    }
    
    .ai-generate-button {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    button {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 12px;
    }
}