@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg-start: #f4f7f5;
    --bg-end: #e2ebd9;
    --brand-gold: #b38600;
    --brand-gold-hover: #8f6b00;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(179, 134, 0, 0.22);
    --text-white: #1c2e21;
    --text-sage: #4e6b54;
    --shadow-glow: rgba(179, 134, 0, 0.06);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
}

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

body {
    background: radial-gradient(circle, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text-white);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Background grid overlay for premium depth */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(207, 159, 29, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(207, 159, 29, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* Main Container */
.scheduler-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px var(--shadow-glow);
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    overflow: hidden;
    z-index: 10;
}

@media (max-width: 900px) {
    .scheduler-container {
        grid-template-columns: 1fr;
    }
}

/* Left Grid: Chat Assistant Panel */
.assistant-panel {
    background: rgba(255, 255, 255, 0.45);
    border-right: 1px solid var(--glass-border);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
}

@media (max-width: 900px) {
    .assistant-panel {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        min-height: auto;
        padding: 30px;
    }
}

.assistant-header {
    margin-bottom: 30px;
}

.assistant-header h1 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text-white);
}

.assistant-header h1 span {
    color: var(--brand-gold);
    font-style: italic;
}

.assistant-header p {
    color: var(--text-sage);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Chat Thread Area */
.chat-thread {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 350px;
    padding-right: 10px;
    margin-bottom: 20px;
}

.chat-bubble {
    max-width: 85%;
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-bubble.aiden {
    background: rgba(179, 134, 0, 0.06);
    border: 1px solid rgba(179, 134, 0, 0.15);
    color: var(--text-white);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--brand-gold);
    color: #ffffff;
    font-weight: 500;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-avatar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.bot-avatar {
    width: 28px;
    height: 28px;
    background: var(--brand-gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #09100b;
    font-weight: 600;
    font-size: 0.75rem;
}

.bot-name {
    font-size: 0.8rem;
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Input Form Area */
.chat-input-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    position: relative;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 15px rgba(207, 159, 29, 0.2);
}

.input-field::placeholder {
    color: rgba(161, 181, 165, 0.5);
}

.submit-btn {
    background: var(--brand-gold);
    color: #09100b;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--brand-gold-hover);
    box-shadow: 0 5px 20px rgba(207, 159, 29, 0.4);
    transform: translateY(-1px);
}

/* Right Panel: Calendar & Grid selection */
.calendar-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 900px) {
    .calendar-panel {
        padding: 30px;
    }
}

.panel-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: var(--text-white);
    border-bottom: 1px solid rgba(207, 159, 29, 0.15);
    padding-bottom: 12px;
}

/* Custom Calendar Date Selector Style */
.calendar-widget {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--brand-gold);
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-nav-btn:hover {
    background: rgba(207, 159, 29, 0.1);
    border-color: var(--brand-gold);
}

.calendar-month-year {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.weekday {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sage);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.calendar-day {
    padding: 8px;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: rgba(207, 159, 29, 0.15);
    color: var(--brand-gold);
}

.calendar-day.active {
    background: var(--brand-gold);
    color: #ffffff;
    font-weight: 600;
}

.calendar-day.disabled {
    color: rgba(78, 107, 84, 0.25);
    cursor: not-allowed;
}

/* Time Slots selector grid */
.slots-container {
    display: none; /* Displayed dynamically once date is chosen */
}

.slots-container.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.time-slot {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot:hover:not(.booked) {
    background: rgba(207, 159, 29, 0.12);
    border-color: var(--brand-gold);
    box-shadow: 0 0 10px rgba(207, 159, 29, 0.15);
}

.time-slot.selected {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: #ffffff;
    font-weight: 600;
}

.time-slot.booked {
    color: rgba(78, 107, 84, 0.3);
    border-color: rgba(179, 134, 0, 0.05);
    cursor: not-allowed;
    text-decoration: line-through;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loader indicator */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(207, 159, 29, 0.2);
    border-radius: 50%;
    border-top-color: var(--brand-gold);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
