/* condividi.css - Stili isolati per il modulo Condividi Esperienza */

.feedback-container {
    padding: 6rem 1rem 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.feedback-header {
    text-align: center;
    margin-bottom: 3rem;
}

.feedback-header h1 {
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.feedback-header p {
    color: var(--color-text-base);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.feedback-form-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem;
}

/* Griglia per i campi in riga */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Personalizzazione Select */
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    transition: var(--transition-base);
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Personalizzazione Radio e Checkbox group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    color: var(--color-text-base);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Rating Scale (1 to 5) */
.rating-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 0.5rem;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.rating-option span {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--color-text-dark);
}

.rating-option input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}

/* Textarea sizing */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* Helpers per label obbligatorie o opzionali */
.optional-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: normal;
}

/* Sezione separator */
.form-section-title {
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    color: var(--color-primary-dark);
    font-size: 1.3rem;
}

/* Loading state */
.btn-submit {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.btn-submit.loading .spinner {
    display: block;
}

.btn-submit.loading .btn-text {
    display: none;
}

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

/* Alert Message */
.alert {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .feedback-form-card {
        padding: 2rem 1.5rem;
    }
    
    .rating-scale {
        padding: 1rem 0.5rem;
    }
}
