/* ==========================================
   FREE SAMPLE MODAL STYLES
   ========================================== */

/* Overlay */
.fs-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 28, 80, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Modal Container */
.fs-modal {
    background: #fff;
    border-radius: 20px;
    width: 95%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: fsSlideUp 0.4s ease;
}

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

/* Close Button */
.fs-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #90A4AE;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 2;
}

.fs-modal-close:hover {
    color: #2B1C50;
}

/* Progress Steps */
.fs-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    gap: 0;
}

.fs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.fs-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ECEFF1;
    color: #90A4AE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.fs-step.active .fs-step-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.35);
}

.fs-step.completed .fs-step-circle {
    background: #4CAF50;
    color: #fff;
}

.fs-step span {
    font-size: 12px;
    color: #90A4AE;
    font-weight: 500;
}

.fs-step.active span,
.fs-step.completed span {
    color: var(--primary-color);
}

.fs-step-line {
    width: 60px;
    height: 3px;
    background: #ECEFF1;
    margin: 0 10px;
    margin-bottom: 20px;
    border-radius: 2px;
    transition: background 0.3s;
}

.fs-step-line.completed {
    background: #4CAF50;
}

/* Panels */
.fs-panel {
    display: none;
}

.fs-panel.active {
    display: block;
    animation: fsFadeIn 0.3s ease;
}

@keyframes fsFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fs-panel h2 {
    font-size: 24px;
    color: #2B1C50;
    margin-bottom: 6px;
    font-weight: 700;
}

.fs-subtitle {
    color: #546E7A;
    font-size: 15px;
    margin-bottom: 25px;
}

/* Step 1: Upload Area */
.fs-upload-area {
    border: 2px dashed #B0BEC5;
    border-radius: 16px;
    padding: 45px 30px;
    text-align: center;
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fs-upload-area:hover,
.fs-upload-area.dragover {
    border-color: var(--primary-color);
    background: #EEF2FF;
}

.fs-upload-icon {
    font-size: 42px;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.fs-upload-area p {
    color: #546E7A;
    margin-bottom: 12px;
    font-size: 15px;
}

.fs-select-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.fs-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.fs-upload-hint {
    font-size: 12px !important;
    color: #90A4AE !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

/* File List */
.fs-file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fs-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid #E0E7EE;
    border-radius: 10px;
    font-size: 14px;
}

.fs-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2B1C50;
    min-width: 0;
}

.fs-file-info i {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

.fs-file-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-file-size {
    color: #90A4AE;
    font-size: 12px;
    margin-left: 6px;
    flex-shrink: 0;
}

.fs-file-remove {
    background: none;
    border: none;
    color: #EF5350;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.fs-file-remove:hover {
    background: #FFEBEE;
}

/* Step 2: Services Grid */
.fs-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fs-service-card {
    cursor: pointer;
}

.fs-service-card input {
    display: none;
}

.fs-service-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #E0E7EE;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fff;
}

.fs-service-inner i {
    font-size: 20px;
    color: #90A4AE;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.fs-service-inner span {
    font-size: 14px;
    color: #2B1C50;
    font-weight: 500;
}

.fs-service-card input:checked + .fs-service-inner {
    border-color: var(--primary-color);
    background: #EEF2FF;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.15);
}

.fs-service-card input:checked + .fs-service-inner i {
    color: var(--primary-color);
}

.fs-service-card:hover .fs-service-inner {
    border-color: var(--primary-light);
}

/* Step 3: Form Fields */
.fs-form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fs-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2B1C50;
    margin-bottom: 6px;
}

.fs-field .required {
    color: #EF5350;
}

.fs-field input,
.fs-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E0E7EE;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: #2B1C50;
    background: #F8FAFC;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.fs-field input:focus,
.fs-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.fs-field input::placeholder,
.fs-field textarea::placeholder {
    color: #B0BEC5;
}

.fs-field textarea {
    resize: vertical;
}

/* Thank You Screen */
.fs-thankyou {
    text-align: center;
    padding: 30px 0;
}

.fs-thankyou-icon {
    font-size: 64px;
    color: #4CAF50;
    margin-bottom: 20px;
    animation: fsPopIn 0.5s ease;
}

@keyframes fsPopIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.fs-thankyou h2 {
    font-size: 28px;
    text-align: center;
}

.fs-thankyou p {
    color: #546E7A;
    font-size: 16px;
    margin-top: 10px;
}

.fs-thankyou-detail {
    margin-top: 8px;
    font-size: 15px;
}

/* Navigation Buttons */
.fs-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.fs-btn-back,
.fs-btn-next {
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.fs-btn-back {
    background: #ECEFF1;
    color: #546E7A;
}

.fs-btn-back:hover {
    background: #CFD8DC;
}

.fs-btn-back.hidden {
    visibility: hidden;
}

.fs-btn-next {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.fs-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4);
}

.fs-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner on submit */
.fs-btn-next .fs-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fsSpin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.fs-btn-next.loading .fs-spinner {
    display: inline-block;
}

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

/* Error message */
.fs-error {
    background: #FFF3F0;
    color: #D32F2F;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
    display: none;
    border: 1px solid #FFCDD2;
}

.fs-error.show {
    display: block;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .fs-modal {
        padding: 25px 20px;
        max-height: 95vh;
        width: 95%;
        border-radius: 16px;
    }

    .fs-panel h2 {
        font-size: 20px;
    }

    .fs-services-grid {
        grid-template-columns: 1fr;
    }

    .fs-step span {
        font-size: 10px;
    }

    .fs-step-line {
        width: 35px;
    }

    .fs-upload-area {
        padding: 30px 15px;
    }

    .fs-btn-back,
    .fs-btn-next {
        padding: 10px 22px;
        font-size: 14px;
    }
}
