/**
 * Calendly Discovery Call Modal Stylesheet
 */

/* Modal Overlay */
.wexico-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 21, 36, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.wexico-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Dialog Box */
.wexico-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(12, 21, 36, 0.35);
    padding: 36px 40px;
    box-sizing: border-box;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
}

.wexico-modal-overlay.active .wexico-modal-dialog {
    transform: translateY(0) scale(1);
}

/* Close Button */
.wexico-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.wexico-modal-close:hover {
    background: #e2e8f0;
    color: #0c1524;
    transform: rotate(90deg);
}

/* Modal Header */
.wexico-modal-header {
    margin-bottom: 24px;
    text-align: left;
}

.wexico-modal-badge {
    display: inline-block;
    background: rgba(255, 129, 89, 0.12);
    color: #ff8159;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.wexico-modal-header h3 {
    font-size: 26px;
    font-weight: 800;
    color: #0c1524;
    margin: 0 0 6px;
    line-height: 1.25;
}

.wexico-modal-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

/* Modal Steps */
.wexico-modal-step {
    display: none;
}

.wexico-modal-step.active {
    display: block;
    animation: wexicoFadeStep 0.3s ease;
}

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

/* Form Styles */
.wexico-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.wexico-form-group {
    flex: 1;
    margin-bottom: 16px;
    text-align: left;
}

.wexico-form-row .wexico-form-group {
    margin-bottom: 0;
}

.wexico-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.wexico-form-group input,
.wexico-form-group select,
.wexico-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0c1524;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.wexico-form-group input:focus,
.wexico-form-group select:focus,
.wexico-form-group textarea:focus {
    outline: none;
    border-color: #ff8159;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 129, 89, 0.15);
}

.wexico-form-actions {
    margin-top: 24px;
}

.wexico-btn-schedule {
    width: 100%;
    background: #ff8159;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 129, 89, 0.35);
}

.wexico-btn-schedule:hover {
    background: #f06a3e;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 129, 89, 0.45);
}

.wexico-btn-schedule:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Step 2 Calendly Container */
.wexico-step-back-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.wexico-back-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.wexico-back-btn:hover {
    color: #0c1524;
    background: #f1f5f9;
}

.wexico-chip {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Step 2 Interactive Scheduler */
.wexico-scheduler-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
    min-height: 380px;
}

/* Calendar Column */
.wexico-cal-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
}

.wexico-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.wexico-cal-month-title {
    font-size: 15px;
    font-weight: 700;
    color: #0c1524;
}

.wexico-cal-nav {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    color: #334155;
    transition: all 0.15s ease;
}

.wexico-cal-nav:hover {
    background: #0c1524;
    color: #ffffff;
    border-color: #0c1524;
}

.wexico-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}

.wexico-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.15s ease;
}

.cal-day:hover:not(.disabled):not(.empty) {
    background: rgba(255, 129, 89, 0.15);
    color: #ff8159;
}

.cal-day.active {
    background: #ff8159 !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 129, 89, 0.35);
}

.cal-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.cal-day.empty {
    cursor: default;
}

.wexico-cal-tz {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 11px;
    color: #64748b;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.wexico-cal-tz .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Slots Column */
.wexico-slots-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wexico-slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.wexico-slots-title {
    font-size: 14px;
    font-weight: 700;
    color: #0c1524;
}

.wexico-duration-badge {
    background: #eef2f7;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.wexico-time-slots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 270px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.time-slot-btn {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #0c1524;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.time-slot-btn:hover {
    border-color: #ff8159;
    color: #ff8159;
    background: #fff8f6;
}

.time-slot-btn.active {
    background: #0c1524;
    color: #ffffff;
    border-color: #0c1524;
    box-shadow: 0 4px 12px rgba(12, 21, 36, 0.2);
}

@media (max-width: 767px) {
    .wexico-scheduler-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wexico-time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 180px;
    }
}


/* Step 3 Success Screen */
.wexico-success-box {
    text-align: center;
    padding: 30px 10px;
}

.wexico-success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.wexico-success-box h4 {
    font-size: 24px;
    font-weight: 800;
    color: #0c1524;
    margin: 0 0 8px;
}

.wexico-success-box p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.wexico-confirmed-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 14px;
    color: #334155;
}

.wexico-success-note {
    font-size: 13px !important;
    color: #94a3b8 !important;
}

.wexico-btn-close-final {
    background: #0c1524;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.wexico-btn-close-final:hover {
    background: #1e293b;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .wexico-modal-dialog {
        padding: 24px 18px;
        border-radius: 16px;
        max-height: 95vh;
    }

    .wexico-form-row {
        flex-direction: column;
        gap: 0;
    }

    .wexico-form-row .wexico-form-group {
        margin-bottom: 16px;
    }

    .wexico-modal-header h3 {
        font-size: 21px;
    }

    .wexico-calendly-inline-embed {
        height: 600px;
    }
}

/* Live Calendly Scheduler Container & Dialog Expansion */
.wexico-modal-dialog.expanded-calendly {
    max-width: 960px;
    width: 95%;
    padding: 28px 30px;
}

.wexico-calendly-inline-embed {
    min-width: 320px;
    height: 700px;
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.wexico-calendly-inline-embed iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 660px !important;
    border: none !important;
}

.wexico-calendly-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 380px;
    color: #64748b;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
}

.wexico-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #e2e8f0;
    border-top-color: #ff8159;
    border-radius: 50%;
    animation: wexicoSpin 0.8s linear infinite;
}

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