/* 🚀 MULTI-STEP CF7 FORM STYLES */
.ms-form-container {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.ms-form-container h2.main-title {
    color: #00aced;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

/* Progress Bar */
.ms-progress-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 50px;
    padding: 0 10px;
}

.ms-progress-bar {
    position: absolute;
    top: 22px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eef2f7;
    z-index: 1;
    border-radius: 10px;
}

.ms-progress-bar-fill {
    position: absolute;
    top: 22px;
    left: 0;
    width: 0%;
    height: 4px;
    background: #00aced;
    z-index: 2;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 10px;
}

.ms-step-item {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 25%;
}

.ms-step-num {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border: 2px solid #eef2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    line-height: 1;
}

.ms-step-num span {
    display: block;
    line-height: 1;
    margin: 0;
    padding: 0;
    margin-top: 15px;
}

.ms-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
}

.ms-step-item.active .ms-step-num {
    border-color: #00aced;
    background: #00aced;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(0, 172, 237, 0.5);
}

.ms-step-item.active .ms-step-label {
    color: #00aced;
    font-weight: 700;
}

.ms-step-item.completed .ms-step-num {
    background: #00aced;
    border-color: #00aced;
    color: #ffffff;
}

.ms-step-item.completed .ms-step-num::after {
    content: '✓';
    font-size: 20px;
}

.ms-step-item.completed .ms-step-num span {
    display: none;
}

/* Hide number when completed */

/* Step Content */
.ms-step-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.ms-step-content.active {
    display: block;
}

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

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

/* Form Groups */
.form-row-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group-custom {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.form-group-custom.full-width {
    flex: 0 0 100%;
}

.form-group-custom label,
.input-filled label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-ttl {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    font-size: 24px;
    color: #333;
    font-weight: 600;
    border-bottom: none;
    /* Reset theme defaults */
}

.form-ttl span:first-child {
    background: #00aced;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    text-transform: none;
}

.form-group-custom .required,
.requiredCls {
    color: #ef4444;
    margin-left: 3px;
}

.input-filled {
    margin-bottom: 20px;
    position: relative;
}

/* CF7 Input Overrides */
.ms-form-container input:not([type="submit"]),
.ms-form-container select,
.ms-form-container textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
    background: #f8fafc !important;
}

.ms-form-container input:focus,
.ms-form-container select:focus,
.ms-form-container textarea:focus {
    border-color: #00aced !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(0, 172, 237, 0.1) !important;
    transform: translateY(-1px);
}

/* Error States */
.error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: #ef4444 !important;
    background: #fffafa !important;
}

.has-error .error-msg,
.wpcf7-not-valid-tip {
    display: block !important;
    color: #ef4444 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    font-weight: 500 !important;
}

/* Hide CF7's default validation message if we are showing our own, 
   but ensure it's visible if server-side validation triggers it */
.wpcf7-response-output {
    border-radius: 10px !important;
    margin: 20px 0 !important;
    padding: 15px !important;
    font-size: 14px !important;
}

/* Buttons */
.ms-button-group {
    /* display: flex; */
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
}

.ms-button-group.space-between {
    justify-content: space-between;
}

.ms-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    border: none;
}

.next-btn,
.sent-btn {
    background: linear-gradient(135deg, #00aced 0%, #007bb5 100%);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 172, 237, 0.3);
}

.next-btn:hover,
.sent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(0, 172, 237, 0.4);
    opacity: 0.95;
}

.prev-btn {
    background: #f1f5f9;
    color: #475569;
}

.prev-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Preview Section Styles */
.preview-section {
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.preview-group {
    margin-bottom: 25px;
}

.preview-group:last-child {
    margin-bottom: 0;
}

.preview-group h4 {
    color: #00aced;
    font-size: 18px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item strong {
    color: #64748b;
    font-size: 14px;
}

.preview-item span {
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .ms-form-container {
        padding: 20px;
    }

    .ms-step-label {
        display: none;
    }

    .ms-progress-bar,
    .ms-progress-bar-fill {
        left: 15%;
        width: 70%;
    }

    .form-group-custom {
        flex: 0 0 100%;
    }
}