/**
 * MV Form Styles
 * @package MV_Form
 */

/* ==========================================================================
   Form Steps
   ========================================================================== */

.mv-form-steps {
    width: 100%;
}

.mv-form-step {
    display: none !important;
    width: 100%;
}

.mv-form-step.mv-form-step-active {
    display: block !important;
    width: 100%;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

.mv-form-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mv-form-heading {
    text-align: center;
    margin-bottom: 40px;
}

.mv-form-heading h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.mv-form-heading p {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Progress Modal
   ========================================================================== */

.mv-form-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.mv-form-backdrop.mv-form-modal-visible {
    display: flex;
}

.mv-form-progress {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.mv-form-progress-bar {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar .bar {
    display: block;
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.mv-form-progress-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.mv-form-progress-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.mv-form-hidden {
    display: none !important;
}

/* ==========================================================================
   Stepper
   ========================================================================== */

.mv-form-progress-stepper {
    margin-bottom: 40px;
}

.mv-form-stepper-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mv-form-stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.mv-form-stepper-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mv-form-step-counter {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mv-form-step-name {
    font-size: 14px;
    color: #666;
}

.mv-form-stepper-item.mv-form-step-current .mv-form-step-counter {
    background: #4CAF50;
    color: #fff;
}

.mv-form-stepper-item.mv-form-step-done .mv-form-step-counter {
    background: #2196F3;
    color: #fff;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.mv-form-single-step {
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.mv-form-single-step h3 {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.mv-form-field-group {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.mv-form-field-group-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mv-form-field-group-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mv-form-field {
    margin-bottom: 20px;
}

.mv-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.mv-form-field-required label::after {
    content: ' *';
    color: #f44336;
}

.mv-form-field input[type="text"],
.mv-form-field input[type="email"],
.mv-form-field input[type="password"],
.mv-form-field input[type="tel"],
.mv-form-field input[type="number"],
.mv-form-field textarea,
.mv-form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.mv-form-field input:focus,
.mv-form-field textarea:focus,
.mv-form-field select:focus {
    outline: none;
    border-color: #4CAF50;
}

.mv-form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.mv-form-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.mv-form-is-invalid {
    border-color: #f44336 !important;
}

/* Radio Group */
.mv-form-radio-group {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.mv-form-radio-group li {
    flex: 1;
    min-width: 150px;
}

.mv-form-radio-group input[type="radio"] {
    display: none;
}

.mv-form-radio-group label {
    display: block;
    padding: 15px 20px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.mv-form-radio-group input[type="radio"]:checked + label {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.mv-form-radio-group label:hover {
    border-color: #4CAF50;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.mv-form-navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.mv-form-button {
    flex: 1;
}

.mv-form-nav-hidden {
    display: none !important;
}

.elementor-button {
    display: inline-block;
    width: 100%;
    padding: 15px 30px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.elementor-button:hover {
    background: #45a049;
}

.elementor-button-outline {
    background: transparent;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.elementor-button-outline:hover {
    background: #4CAF50;
    color: #fff;
}

.elementor-button-danger {
    background: #f44336;
}

.elementor-button-danger:hover {
    background: #da190b;
}

/* ==========================================================================
   Error Report
   ========================================================================== */

#mv_form_report {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

#mv_form_report h5 {
    color: #f44336;
    margin: 0 0 10px 0;
}

.mv-form-post-form-report-alert {
    color: #c62828;
    margin: 5px 0;
}

.mv-form-post-form-report-success {
    background: #e8f5e9;
    border-left-color: #4CAF50;
    color: #2e7d32;
}

/* ==========================================================================
   Dropzone
   ========================================================================== */

.mv-form-dropzone-wrapper {
    margin-top: 15px;
}

.dropzone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.dropzone:hover {
    border-color: #4CAF50;
    background: #f9f9f9;
}

.dropzone .dz-message {
    margin: 0;
}

.dropzone .dz-message i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.dropzone .dz-message h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.dropzone .dz-message p {
    margin: 0;
    color: #666;
}

.mv-form-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.mv-form-image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.mv-form-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mv-form-image-preview-item .remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.mv-form-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.mv-form-modal.mv-form-modal-visible {
    display: flex;
}

.mv-form-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.mv-form-modal-large {
    max-width: 800px;
}

.mv-form-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.mv-form-modal-close:hover {
    color: #333;
}

/* ==========================================================================
   User Products Table
   ========================================================================== */

.mv-form-user-products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mv-form-products-table-wrapper {
    overflow-x: auto;
}

.mv-form-author-products-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.mv-form-author-products-table th,
.mv-form-author-products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.mv-form-author-products-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.mv-form-author-products-table .product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.mv-form-author-products-table .product-actions-buttons {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.mv-form-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: mv-form-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

.mv-form-field-loading {
    position: relative;
}

.mv-form-field-loading::after {
    content: '';
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: mv-form-spin 0.8s linear infinite;
}

/* ==========================================================================
   Select2 Customization
   ========================================================================== */

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 12px;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    padding: 6px 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #4CAF50;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4CAF50;
}

.select2-container.moo_wpfp_is_invalid .select2-selection,
.select2-container.mv-form-is-invalid .select2-selection {
    border-color: #f44336 !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .mv-form-field-group-col-2,
    .mv-form-field-group-col-3 {
        grid-template-columns: 1fr;
    }

    .mv-form-stepper-wrapper::before {
        display: none;
    }

    .mv-form-stepper-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .mv-form-navigation {
        flex-direction: column;
    }

    .mv-form-radio-group {
        flex-direction: column;
    }

    .mv-form-radio-group li {
        min-width: 100%;
    }
}
