/* ===================================
   Book Appointment Page Styles
   =================================== */

/* Appointment Page Container */
.appointment-page {
    min-height: calc(100vh - 5rem);
    padding-top: 9rem;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at top right, rgba(191, 219, 254, 0.4), white, rgba(237, 233, 254, 0.2));
}

/* Background Effects - Same as Hero Section */
.appointment-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
}

.gradient-blob-1 {
    left: -10%;
    top: -10%;
    width: 600px;
    height: 600px;
    background-color: rgba(0, 82, 204, 0.05);
    filter: blur(120px);
}

.gradient-blob-2 {
    right: -5%;
    top: 10%;
    width: 500px;
    height: 500px;
    background-color: rgba(108, 99, 255, 0.05);
    filter: blur(100px);
}

.gradient-blob-3 {
    bottom: 0;
    left: 10%;
    width: 400px;
    height: 400px;
    background-color: rgba(16, 185, 129, 0.1);
    filter: blur(80px);
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.2;
    mix-blend-mode: soft-light;
}

.appointment-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (min-width: 640px) {
    .appointment-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .appointment-container {
        padding: 0 2rem;
    }
}

/* Grid Layout */
.appointment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .appointment-grid {
        grid-template-columns: 5fr 7fr;
    }
}

/* Left Column - Info Section */
.appointment-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.badge-new-patients {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-gray-100);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray-500);
}

.info-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
}

@media (min-width: 1024px) {
    .info-title {
        font-size: 3rem;
    }
}

.title-primary {
    position: relative;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-description {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-gray-600);
    max-width: 36rem;
}

.info-description strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Contact Cards */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 0.875rem;
    padding: 1.75rem;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(0, 82, 204, 0.3), 0 8px 10px -6px rgba(0, 82, 204, 0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.contact-cards::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
}

.contact-icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.contact-content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.contact-content p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Clinic Image */
.clinic-image-container {
    position: relative;
    height: 16rem;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    display: none;
}

@media (min-width: 1024px) {
    .clinic-image-container {
        display: block;
    }
}

.clinic-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.7s ease;
}

.clinic-image:hover {
    transform: scale(1.05);
}

.clinic-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.clinic-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
}

.clinic-badge .material-symbols-outlined {
    font-size: 1rem;
}

/* Right Column - Form Section */
.appointment-form-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 0.875rem;
    box-shadow: 0 2px 8px -2px rgba(0, 82, 204, 0.08), 0 1px 4px -1px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 82, 204, 0.03) inset;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .appointment-form-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .appointment-form-card {
        padding: 2.5rem;
    }
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f2f1f4;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.form-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.form-progress {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 50%;
}

.progress-dot.active {
    background-color: #7b3ccd;
}

.progress-dot.inactive {
    background-color: #e0dde4;
}

/* Form Styles */
.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .form-row {
        flex-direction: row;
    }

    .form-row .form-group {
        flex: 1;
    }
}

.form-label {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.form-label.required::after {
    content: " *";
    color: #dc2626;
}

/* Input Container with Icon */
.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-secondary);
}

.input-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--color-gray-200);
    background-color: white;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.form-input.has-icon {
    padding-left: 3rem;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626;
}

.form-textarea {
    resize: vertical;
    min-height: 5rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem 1.5rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Error Messages */
.error-message {
    display: none;
    font-size: 0.875rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.error-message.show {
    display: block;
}

/* Honeypot - Hidden Field */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alert .material-symbols-outlined {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-success {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* Submit Button */
.form-actions {
    padding-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5rem;
    background-image: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 82, 204, 0.2);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 22px -10px rgba(0, 82, 204, 0.3);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit .spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-submit.loading .spinner {
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Privacy Policy Text */
.privacy-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 1rem;
}

.privacy-text a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.privacy-text a:hover {
    color: var(--color-primary-dark);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 639px) {
    .appointment-page {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    .info-title {
        font-size: 2rem;
    }

    .info-description {
        font-size: 1rem;
    }

    .appointment-form-card {
        padding: 1.5rem;
    }
}

/* Accessibility - Focus visible for button only (form inputs already have :focus styles) */
.btn-submit:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Date Input Styling */
.form-input[type="date"] {
    position: relative;
    cursor: pointer;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.form-input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Phone Input Styling */
.phone-prefix-wrapper {
    position: absolute;
    left: 3rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.phone-prefix {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--color-gray-200);
    height: 1.5rem;
    display: flex;
    align-items: center;
}

.form-input.has-phone-prefix {
    padding-left: 6.5rem;
}