/* ============================================
   FEEDBACK MAPS PRO - FEEDBACK FORM STYLES
   Modern UI Design System
   ============================================ */

/* ============================================
   MAIN CONTAINER
   ============================================ */

.feedback-form-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e2e8f0;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.fm-progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}

.fm-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.fm-step-indicator {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 500;
}

.fm-current-step {
    color: #4f46e5;
    font-weight: 700;
}

/* ============================================
   HORIZONTAL STEPS CONTAINER
   ============================================ */

.fm-steps-viewport {
    overflow: hidden;
    width: 100%;
}

.fm-steps-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.fm-step {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fm-step.active {
    opacity: 1;
    visibility: visible;
}

.fm-step-actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
    margin-bottom: 28px;
}

.form-group:last-of-type {
    margin-bottom: 32px;
}

/* ============================================
   LABELS
   ============================================ */

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.form-label .required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

/* ============================================
   HELPER TEXT
   ============================================ */

.form-helper {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    line-height: 1.5;
}

/* ============================================
   ALERTS CONTAINER
   ============================================ */

.fm-feedback-alerts {
    margin-bottom: 24px;
}

/* ============================================
   CATEGORY SECTION
   ============================================ */

.category-section {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.category-section:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.category-description {
    font-size: 14px;
    color: #475569;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* ============================================
   CATEGORY BUTTONS
   ============================================ */

.category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.category-btn {
    padding: 16px 20px;
    border: 2px solid #ef4444;
    border-radius: 12px;
    background: #ffffff;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15);
}

.category-btn:focus-visible {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
}

.category-btn.active {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

/* Negative Category */
.category-btn.negative {
    border-color: #f59e0b;
    color: #f59e0b;
}

.category-btn.negative:hover {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}

.category-btn.negative.active {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

/* Positive Category */
.category-btn.positive {
    border-color: #10b981;
    color: #10b981;
}

.category-btn.positive:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}

.category-btn.positive.active {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

/* ============================================
   INPUT FIELDS
   ============================================ */

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ============================================
   TEXTAREA
   ============================================ */

.form-textarea {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    line-height: 1.6;
}

.form-textarea::placeholder {
    color: #94a3b8;
}

.form-textarea:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.form-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 12px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

/* Cancel Button */
.btn-cancel {
    padding: 14px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-cancel:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
}

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

.btn-cancel:focus-visible {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
}

.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Submit Button */
.btn-submit {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    font-family: inherit;
    position: relative;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-submit:focus-visible {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit.loading {
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: formSpin 0.6s linear infinite;
}

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

/* ============================================
   ALERTS
   ============================================ */

.form-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alertSlideIn 0.3s ease;
    font-weight: 500;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-alert.success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.form-alert.error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-alert.warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.form-alert.info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
    .feedback-form-wrapper {
        padding: 28px 24px;
        border-radius: 16px;
    }

    .form-group {
        margin-bottom: 24px;
    }

    .category-buttons {
        grid-template-columns: 1fr;
    }

    .category-btn {
        padding: 14px 18px;
    }

    .form-actions,
    .fm-step-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-cancel,
    .btn-submit {
        padding: 14px 20px;
    }

    .form-input,
    .form-textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .feedback-form-wrapper {
        padding: 24px 20px;
    }

    .form-label {
        font-size: 13px;
    }

    .category-section {
        padding: 20px;
    }

    .category-description {
        font-size: 13px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .feedback-form-wrapper {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .fm-progress-bar {
        background: #334155;
    }

    .fm-step-indicator {
        color: #94a3b8;
    }

    .fm-current-step {
        color: #818cf8;
    }

    .fm-step-actions {
        border-top-color: #334155;
    }

    .form-label {
        color: #e2e8f0;
    }

    .form-helper {
        color: #94a3b8;
    }

    .category-section {
        border-color: #334155;
        background: #0f172a;
    }

    .category-section:hover {
        background: #1e293b;
        border-color: #475569;
    }

    .category-description {
        color: #cbd5e1;
    }

    .category-btn {
        background: #1e293b;
    }

    .form-input,
    .form-textarea {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: #64748b;
    }

    .form-input:hover,
    .form-textarea:hover {
        background: #1e293b;
        border-color: #475569;
    }

    .form-input:focus,
    .form-textarea:focus {
        background: #1e293b;
        border-color: #818cf8;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
    }

    .btn-cancel {
        background: #0f172a;
        color: #cbd5e1;
        border-color: #334155;
    }

    .btn-cancel:hover {
        background: #1e293b;
        border-color: #475569;
    }

    .form-actions {
        border-top-color: #334155;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .category-btn,
    .btn-cancel,
    .btn-submit,
    .form-input,
    .form-textarea,
    .category-section {
        transition: none;
    }

    .form-alert {
        animation: none;
    }

    .btn-submit.loading::after {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .feedback-form-wrapper,
    .category-section,
    .form-input,
    .form-textarea,
    .category-btn {
        border-width: 3px;
        border-color: #1e293b;
    }
}