/* Premium Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Base Container Styling */
.msf-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Outfit', sans-serif;
    color: #333;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.msf-progress-wrapper {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 8px;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.msf-progress-bar {
    background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%);
    height: 100%;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.msf-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.msf-progress-labels span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #adb5bd;
    transition: color 0.3s ease;
}

.msf-progress-labels span.active {
    color: #ff416c;
    font-weight: 600;
}

/* Form Steps */
.msf-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.msf-step.active {
    display: block;
}

.msf-step h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a202c;
}

.msf-step p {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 25px;
}

/* Inputs */
.msf-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.msf-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
}

.msf-input-group input[type="text"],
.msf-input-group input[type="email"],
.msf-input-group input[type="tel"],
.msf-input-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    box-sizing: border-box;
}

.msf-input-group input:focus,
.msf-input-group select:focus {
    outline: none;
    border-color: #ff416c;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 65, 108, 0.15);
}

/* Checkbox Grid for Child Services */
.msf-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .msf-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.msf-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
}

.msf-checkbox-label:hover {
    border-color: #cbd5e0;
    background: #f1f5f9;
}

.msf-checkbox-label input[type="checkbox"] {
    display: none;
}

/* Custom Checkbox Appearance */
.msf-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: white;
}

.msf-checkbox-label input[type="checkbox"]:checked+.msf-checkbox-custom {
    background: #ff416c;
    border-color: #ff416c;
}

.msf-checkbox-label input[type="checkbox"]:checked+.msf-checkbox-custom::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.msf-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #ff416c;
    background: rgba(255, 65, 108, 0.05);
}

/* Buttons */
.msf-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.msf-actions .btn-next,
.msf-actions .btn-submit {
    margin-left: auto;
}

button[class*="msf-btn-"] {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.msf-btn-primary {
    background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

.msf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.5);
}

.msf-btn-primary:active {
    transform: translateY(0);
}

.msf-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.msf-btn-secondary:hover {
    background: #e2e8f0;
}

.msf-btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.msf-btn-success:hover {
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.5);
}

/* Success Message */
.msf-success-message {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 10px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.msf-success-icon {
    width: 80px;
    height: 80px;
    color: #48bb78;
    margin-bottom: 20px;
}

/* Loader */
.msf-loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #ff416c;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}