/* ========== FEEDBACK MODAL OVERLAY ========== */
.feedback-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.feedback-modal-overlay.active {
    display: flex;
    animation: feedbackFadeIn 0.2s ease-out;
}

@keyframes feedbackFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== FEEDBACK MODAL CONTAINER ========== */
.feedback-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px; /* Más ancho, igual que el de perfil */
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: feedbackSlideUp 0.2s ease-out;
}

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

/* ========== FEEDBACK HEADER ========== */
.feedback-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
    position: relative;
}

.feedback-modal-header .feedback-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 24px;
    flex-shrink: 0;
}

.feedback-header-text {
    flex: 1;
}

.feedback-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.feedback-modal-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

/* Botón X de cierre rápido integrado en el header */
.feedback-close {
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


/* ========== FEEDBACK CONTENT / FORM ========== */
.feedback-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0; /* Controlado por el gap del contenedor */
}

.feedback-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.feedback-input,
.feedback-select,
.feedback-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.feedback-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M1 4l5 4 5-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.feedback-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========== ALERT / ERROR MESSAGES ========== */
.feedback-error {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
    animation: feedbackSlideDown 0.3s ease;
}

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

/* ========== FEEDBACK ACTIONS (FOOTER) ========== */
.feedback-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.feedback-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.feedback-btn-send {
    background: #374151;
    color: white;
}

.feedback-btn-send:hover:not(:disabled) {
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feedback-btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-btn-cancel {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.feedback-btn-cancel:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: black;
}

/* ========== SUCCESS MESSAGE ========== */
#feedback-success {
    display: none;
    padding: 40px 24px;
    text-align: center;
}

.feedback-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    border-left: none;
    color: #15803d;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-weight: bold;
}

.feedback-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.feedback-success-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .feedback-modal {
        width: 95%;
        border-radius: 12px;
    }

    .feedback-modal-header {
        padding: 16px;
    }

    .feedback-modal-content {
        padding: 16px;
        gap: 16px;
    }
    
    .feedback-modal-footer {
        flex-direction: column;
    }
}