/* Appointment Booking Modal Styles */

/* Modal Base Styles */
.ucm-appt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto !important;
    height: auto !important;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin: 0;
}

.ucm-appt-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ucm-appt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: -1;
}

.ucm-appt-modal-container {
    position: relative;
    background: #fff;
    border-radius: 24px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 1;
}

.ucm-appt-modal.active .ucm-appt-modal-container {
    transform: scale(1);
}

/* Modal Header */
.ucm-appt-modal-header {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: #fff;
    padding: 24px 28px;
    position: relative;
}

.ucm-appt-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.ucm-appt-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: #fff;
    transition: all 0.2s;
    border: none;
}

.ucm-appt-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.ucm-appt-modal-body {
    padding: 32px 28px 28px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* Form Sections */
.ucm-appt-form-section {
    display: none;
    animation: apptSlideIn 0.3s ease;
}

.ucm-appt-form-section.active {
    display: block;
}

@keyframes apptSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ucm-appt-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.ucm-appt-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0369a1;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}

/* Form Elements */
.ucm-appt-form-row {
    margin-bottom: 20px;
}

.ucm-appt-form-row.ucm-appt-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ucm-appt-form-group {
    margin-bottom: 20px;
}

.ucm-appt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.ucm-appt-form-group input[type="text"],
.ucm-appt-form-group input[type="email"],
.ucm-appt-form-group input[type="tel"],
.ucm-appt-form-group input[type="date"],
.ucm-appt-form-group select,
.ucm-appt-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
    background: #fff;
}

.ucm-appt-form-group input:focus,
.ucm-appt-form-group select:focus,
.ucm-appt-form-group textarea:focus {
    outline: none;
    border-color: #0369a1;
    box-shadow: 0 0 0 4px rgba(3, 105, 161, 0.1);
}

.ucm-appt-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ucm-appt-input-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

/* Time Slots Grid */
.ucm-appt-time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.ucm-appt-time-slot {
    padding: 12px 16px;
    text-align: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.ucm-appt-time-slot:hover {
    background: #e0f2fe;
    border-color: #0369a1;
    transform: translateY(-2px);
}

.ucm-appt-time-slot.selected {
    background: #0369a1;
    border-color: #0369a1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.3);
}

.ucm-appt-time-slot.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

.ucm-appt-time-slot.unavailable:hover {
    transform: none;
    border-color: #e2e8f0;
}

.ucm-appt-loading {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 14px;
}

/* Buttons */
.ucm-appt-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ucm-appt-btn-primary {
    background: #0369a1;
    color: #fff;
}

.ucm-appt-btn-primary:hover:not(:disabled) {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(3, 105, 161, 0.3);
}

.ucm-appt-btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
}

.ucm-appt-btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.3);
}

.ucm-appt-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.ucm-appt-btn-secondary:hover {
    background: #e2e8f0;
}

.ucm-appt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ucm-appt-form-actions {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
}

.ucm-appt-form-actions.ucm-appt-actions-split {
    justify-content: space-between;
}

/* Confirmation Card */
.ucm-appt-confirmation-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.ucm-appt-conf-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ucm-appt-confirmation-card h4 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #0f172a;
}

.ucm-appt-conf-details {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.ucm-appt-conf-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ucm-appt-conf-row:last-child {
    border-bottom: none;
}

.ucm-appt-conf-label {
    font-weight: 600;
    color: #64748b;
    font-size: 14px;
}

.ucm-appt-conf-row span:last-child {
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
}

.ucm-appt-conf-note {
    background: #fffbeb;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    color: #854d0e;
    text-align: left;
}

/* Success Section */
.ucm-appt-success-section {
    text-align: center;
    padding: 20px 0;
}

.ucm-appt-success-animation {
    margin-bottom: 24px;
}

.ucm-appt-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.ucm-appt-checkmark-svg {
    width: 100%;
    height: 100%;
}

.ucm-appt-checkmark-circle {
    stroke: #22c55e;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: apptStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.ucm-appt-checkmark-check {
    stroke: #22c55e;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: apptStroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes apptStroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.ucm-appt-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
}

.ucm-appt-success-details {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.ucm-appt-ref-number {
    font-size: 16px;
    color: #065f46;
    margin: 0 0 12px;
}

.ucm-appt-ref-number strong {
    color: #047857;
    font-size: 18px;
}

.ucm-appt-success-msg {
    margin: 0 0 12px;
    color: #064e3b;
}

.ucm-appt-success-note {
    margin: 0;
    font-size: 14px;
    color: #065f46;
}

/* Progress Bar */
.ucm-appt-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ucm-appt-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ucm-appt-progress-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.ucm-appt-progress-step span {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s;
}

.ucm-appt-progress-step.active .ucm-appt-progress-circle {
    background: #0369a1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.3);
}

.ucm-appt-progress-step.active span {
    color: #0369a1;
}

.ucm-appt-progress-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ucm-appt-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .ucm-appt-modal-header {
        padding: 20px;
    }

    .ucm-appt-modal-header h2 {
        font-size: 18px;
        padding-right: 40px;
    }

    .ucm-appt-modal-body {
        padding: 24px 20px;
    }

    .ucm-appt-form-row.ucm-appt-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ucm-appt-time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .ucm-appt-time-slot {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ucm-appt-progress-step span {
        font-size: 11px;
    }

    .ucm-appt-progress-line {
        width: 40px;
    }

    .ucm-appt-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Get Help Button (to trigger modal) */
.ucm-get-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(3, 105, 161, 0.3);
    font-family: 'Poppins', sans-serif;
}

.ucm-get-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(3, 105, 161, 0.4);
    color: #fff;
}

.ucm-get-help-btn::before {
    content: '📞';
    font-size: 20px;
}