/* Survey AINR - Frontend Styles */

.survey-header {
    background: linear-gradient(160deg, #1e2a6e 0%, #2b3990 50%, #3a4db8 100%);
    color: #fff;
    padding: 32px 20px 28px;
    text-align: center;
}

.survey-header .header-inner {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.survey-header .logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.survey-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    line-height: 1.35;
    max-width: 560px;
    color: #fff;
}

.survey-header .subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.survey-header .header-divider {
    width: 48px;
    height: 3px;
    background: #e8862d;
    border-radius: 2px;
    margin: 10px auto 0;
}

/* Container */
.survey-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px;
}

/* Card */
.survey-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    overflow: hidden;
}

.survey-card .card-accent {
    height: 6px;
    background: linear-gradient(90deg, #2b3990, #e8862d);
}

.survey-card .card-body {
    padding: 28px 32px;
}

/* Informativa */
.informativa-card .card-body {
    font-size: 0.92rem;
    color: #555;
}

.informativa-card .card-body h2,
.survey-card .card-body h2 {
    font-size: 1.1rem;
    color: #2b3990;
    margin-bottom: 12px;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}

.informativa-card .card-body p {
    margin-bottom: 10px;
}

.informativa-card .card-body a,
.survey-card .card-body a {
    color: #e8862d !important;
    text-decoration: underline !important;
    font-weight: 500;
}

.informativa-card .card-body .note {
    font-style: italic;
    color: #777;
    font-size: 0.85rem;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* Section title */
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2b3990;
    margin-bottom: 6px;
}

.section-description {
    font-size: 0.88rem;
    color: #777;
    margin-bottom: 20px;
}

/* Form groups */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #333;
}

.form-group label .required {
    color: #d32f2f;
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    border-color: #2b3990;
    box-shadow: 0 0 0 3px rgba(43, 57, 144, 0.12);
}

/* Options list */
.options-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.options-list li {
    margin-bottom: 8px;
}

.options-list label {
    display: flex !important;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    color: #333;
    margin-bottom: 0;
}

.options-list label:hover {
    background: #f5f7fa;
}

.options-list input[type="radio"],
.options-list input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #2b3990;
    flex-shrink: 0;
}

/* Altro inline */
.altro-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.altro-inline input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    width: auto !important;
}

.altro-inline input[type="text"]:focus {
    border-color: #2b3990;
}

/* Progress bar */
.progress-bar-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px 16px 14px;
    margin-bottom: 24px;
}

.progress-steps {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 3px;
    background: #e0e3ea;
    border-radius: 2px;
    transition: background 0.4s;
}

.progress-step.completed:not(:last-child)::after {
    background: #e8862d;
}

.progress-step .step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8ecf2;
    color: #aab2c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 8px;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    border: 2.5px solid transparent;
    position: relative;
}

.progress-step.active .step-circle {
    background: #fff;
    color: #2b3990;
    border-color: #2b3990;
    box-shadow: 0 0 0 4px rgba(43, 57, 144, 0.12);
    transform: scale(1.1);
}

.progress-step.completed .step-circle {
    background: #e8862d;
    color: #fff;
    border-color: #e8862d;
}

.progress-step .step-label {
    font-size: 0.68rem;
    color: #aab2c0;
    text-align: center;
    font-weight: 500;
    line-height: 1.25;
    max-width: 80px;
    transition: color 0.3s;
}

.progress-step.active .step-label {
    color: #2b3990;
    font-weight: 700;
}

.progress-step.completed .step-label {
    color: #c06e1f;
    font-weight: 600;
}

/* Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2b3990;
    color: #fff;
}

.btn-primary:hover {
    background: #1e2a6e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 57, 144, 0.35);
}

.btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: #e8862d;
    color: #fff;
    padding: 12px 36px;
    font-size: 1rem;
}

.btn-success:hover {
    background: #d07525;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 134, 45, 0.4);
}

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

/* Steps */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

/* Confirmation */
.confirmation-page {
    text-align: center;
    padding: 48px 32px;
}

.confirmation-page .check-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff3e0;
    color: #e8862d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.confirmation-page h2 {
    color: #2b3990;
    margin-bottom: 12px;
}

.confirmation-page p {
    color: #666;
    max-width: 480px;
    margin: 0 auto;
}

/* Validation */
.form-group.has-error input[type="text"],
.form-group.has-error input[type="email"] {
    border-color: #d32f2f;
}

.form-group .error-msg {
    color: #d32f2f;
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.form-group.has-error .error-msg {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .survey-header {
        padding: 24px 16px 20px;
    }

    .survey-header .logo-img {
        width: 64px;
        height: 64px;
    }

    .survey-header h1 {
        font-size: 1.15rem;
    }

    .survey-header .subtitle {
        font-size: 0.75rem;
    }

    .survey-card .card-body {
        padding: 20px 18px;
    }

    .progress-bar-container {
        padding: 14px 8px 10px;
    }

    .progress-step .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .progress-step:not(:last-child)::after {
        top: 13px;
        left: calc(50% + 14px);
        width: calc(100% - 28px);
        height: 2px;
    }

    .progress-step .step-label {
        font-size: 0.58rem;
        max-width: 56px;
    }

    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
