/* ─── FCF Booking Widget ─── */
.fcf-booking-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #333;
}

/* Formation Block */
.fcf-formation-block {
    margin-bottom: 50px;
}

.fcf-formation-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.fcf-event-count {
    font-size: 15px;
    color: #7f8c8d;
    margin: 0 0 20px 0;
}

/* Session Card */
.fcf-session-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 20px 25px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.fcf-session-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.fcf-session-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #4A90D9, #1a7b6e);
    border-radius: 8px 0 0 8px;
}

/* Date Block */
.fcf-session-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    margin-right: 25px;
    padding-left: 10px;
}

.fcf-date-label {
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.fcf-date-day {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
}

.fcf-date-month {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 400;
}

.fcf-date-time {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 2px;
}

/* Session Info */
.fcf-session-info {
    flex: 1;
    min-width: 0;
}

.fcf-session-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.fcf-session-spots {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fcf-spots-badge {
    font-size: 13px;
    font-weight: 700;
    color: #27ae60;
    background: #f0fdf4;
    padding: 4px 8px;
    border-radius: 4px;
}

.fcf-spots-text {
    font-size: 13px;
    color: #27ae60;
}

/* Price */
.fcf-session-price {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 25px;
    white-space: nowrap;
}

.fcf-session-price .currency {
    font-size: 16px;
    margin-right: 2px;
}

/* Reserve Button */
.fcf-btn-reserve {
    background: #1a4d5c;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.fcf-btn-reserve:hover {
    background: #15404d;
}

.fcf-btn-reserve:active {
    transform: scale(0.98);
}

/* ─── Modal ─── */
.fcf-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.6) !important;
    z-index: 2147483647 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
#fcfModalOverlay { z-index: 2147483647 !important; }

.fcf-modal-overlay.active {
    display: flex;
}

.fcf-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fcf-slideIn 0.3s ease;
}

@keyframes fcf-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fcf-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcf-modal-close:hover {
    color: #2c3e50;
}

.fcf-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.fcf-modal-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0 0 25px 0;
}

/* Form */
.fcf-form-row {
    display: flex;
    gap: 15px;
}

.fcf-form-row .fcf-form-group {
    flex: 1;
}

.fcf-form-group {
    margin-bottom: 18px;
}

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

.fcf-form-group label .required {
    color: #e74c3c;
}

.fcf-form-group input,
.fcf-form-group textarea,
.fcf-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e6;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
}

.fcf-form-group input:hover,
.fcf-form-group textarea:hover,
.fcf-form-group select:hover {
    border-color: #c4d0d7;
}

.fcf-form-group input:focus,
.fcf-form-group textarea:focus,
.fcf-form-group select:focus {
    outline: none;
    border-color: #1a7b6e;
    box-shadow: 0 0 0 3px rgba(26,123,110,0.1);
}

.fcf-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.fcf-form-group input::placeholder,
.fcf-form-group textarea::placeholder {
    color: #bdc3c7;
}

/* Buttons */
.fcf-btn-primary {
    background: #1a7b6e;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    margin-top: 5px;
}

.fcf-btn-primary:hover {
    background: #156b60;
}

.fcf-btn-primary:active {
    transform: scale(0.99);
}

.fcf-btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.fcf-btn-secondary {
    background: transparent;
    color: #7f8c8d;
    border: 1.5px solid #dde1e6;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    font-weight: 600;
}

.fcf-btn-secondary:hover {
    background: #f8f9fa;
    color: #2c3e50;
    border-color: #c4d0d7;
}

/* Stripe Element */
#fcf-stripe-element {
    padding: 14px;
    border: 1.5px solid #dde1e6;
    border-radius: 6px;
    margin-bottom: 20px;
    background: #fafbfc;
}

.fcf-error {
    color: #e74c3c;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px 12px;
    background: #fbe9e7;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.fcf-success {
    color: #27ae60;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px 12px;
    background: #e8f5e9;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
}

/* Signature */
.fcf-signature-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
}

.fcf-signature-container {
    border: 2px dashed #dde1e6;
    border-radius: 8px;
    margin: 15px 0;
    background: #fafbfc;
    display: flex;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.fcf-signature-container canvas {
    cursor: crosshair;
    background: #fff;
    border-radius: 4px;
    max-width: 100%;
    display: block;
}

.fcf-signature-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.fcf-signature-actions .fcf-btn-secondary {
    width: auto;
    margin-top: 0;
    padding: 8px 16px;
    font-size: 13px;
}

.fcf-signature-actions .fcf-btn-primary {
    flex: 1;
    margin-top: 0;
    padding: 10px 20px;
}

/* Success */
.fcf-success-icon {
    width: 70px;
    height: 70px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.fcf-success-title {
    text-align: center;
    color: #27ae60 !important;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

#fcfStep4 {
    text-align: center;
}

#fcfStep4 p {
    color: #7f8c8d;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

#fcfStep4 .fcf-btn-primary {
    margin-top: 20px;
}

/* Loading */
.fcf-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.fcf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a7b6e;
    border-radius: 50%;
    animation: fcf-spin 0.8s linear infinite;
}

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

.fcf-loading p {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

/* Info / Warning messages */
.fcf-info {
    background: #f0f7ff;
    border-left: 4px solid #4A90D9;
    padding: 12px 16px;
    border-radius: 4px;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.fcf-warning {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    padding: 12px 16px;
    border-radius: 4px;
    color: #8b6914;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Steps Indicator */
.fcf-steps {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
}

.fcf-step {
    flex: 1;
    position: relative;
    text-align: center;
}

.fcf-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    color: #95a5a6;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.fcf-step.active .fcf-step-number {
    background: #1a7b6e;
    color: #fff;
}

.fcf-step.completed .fcf-step-number {
    background: #27ae60;
    color: #fff;
}

.fcf-step-label {
    font-size: 12px;
    color: #95a5a6;
    font-weight: 500;
}

.fcf-step.active .fcf-step-label {
    color: #2c3e50;
    font-weight: 600;
}

.fcf-step::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #f0f0f0;
    z-index: -1;
}

.fcf-step:last-child::after {
    display: none;
}

.fcf-step.completed::after {
    background: #27ae60;
}

/* Checkbox */
.fcf-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.fcf-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1a7b6e;
}

.fcf-checkbox-group label {
    flex: 1;
    margin-bottom: 0;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .fcf-session-card {
        flex-wrap: wrap;
        padding: 15px 18px;
    }

    .fcf-session-date {
        min-width: 65px;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .fcf-date-day {
        font-size: 26px;
    }

    .fcf-session-info {
        flex: 1 1 auto;
        min-width: 150px;
    }

    .fcf-session-price {
        margin: 10px 0 10px 0;
        font-size: 18px;
        order: 5;
        flex-basis: 100%;
    }

    .fcf-btn-reserve {
        width: 100%;
        text-align: center;
        order: 6;
        flex-basis: 100%;
        margin-top: 10px;
    }

    .fcf-modal {
        padding: 25px 20px;
        max-height: 95vh;
    }

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

    .fcf-formation-title {
        font-size: 22px;
    }

    .fcf-signature-container canvas {
        width: 100%;
        height: 150px;
    }

    .fcf-steps {
        margin-bottom: 25px;
    }

    .fcf-step-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .fcf-session-card {
        padding: 12px 15px;
    }

    .fcf-session-date {
        min-width: 55px;
        margin-right: 12px;
    }

    .fcf-date-day {
        font-size: 22px;
    }

    .fcf-date-month {
        font-size: 13px;
    }

    .fcf-date-time {
        font-size: 10px;
    }

    .fcf-session-name {
        font-size: 14px;
    }

    .fcf-modal {
        padding: 20px 15px;
    }

    .fcf-modal-title {
        font-size: 18px;
    }

    .fcf-btn-primary,
    .fcf-btn-reserve {
        padding: 10px 16px;
        font-size: 13px;
    }

    .fcf-formation-title {
        font-size: 18px;
    }

    .fcf-event-count {
        font-size: 13px;
    }
}
