:root {
    --primary: #217C7F;
    --primary-dark: #1a6366;
    --text: #2A3156;
    --error: #dc3545;
    --success: #28a745;
    --border: #E0E0E0;
    --background: #F8F9FA;
}

.form-container {
    max-width: 700px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 120px;
    height: auto;
}

.progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.form-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Persistent recap of the configured training(s), sticky so it stays visible while the
   user scrolls long steps (e.g. the intra employees list). */
.form-context-recap {
    position: sticky;
    top: 0.5rem;
    z-index: 5;
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

.form-context-recap .recap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.form-context-recap .recap-header i {
    /* transform is a no-op on inline elements: make the icon a box so the rotation applies */
    display: inline-block;
    color: var(--primary);
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.form-context-recap.collapsed .recap-header i {
    transform: rotate(180deg);
}

.form-context-recap .recap-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
}

/* Animated collapse: 1fr -> 0fr animates to the natural content height without measuring it. */
.form-context-recap .recap-body {
    display: grid;
    grid-template-rows: 1fr;
    margin-top: 0.25rem;
    opacity: 1;
    transition: grid-template-rows 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.form-context-recap.collapsed .recap-body {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
}

.form-context-recap .recap-body-inner {
    overflow: hidden;
    min-height: 0;
}

.form-context-recap .recap-entry {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
    row-gap: 0.1rem;
    align-items: baseline;
}

.form-context-recap .recap-entry + .recap-entry {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--background);
}

.form-context-recap .recap-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.form-context-recap .recap-item i {
    color: var(--primary);
    margin-right: 0.35rem;
    font-size: 0.8rem;
}

.form-control {
    border: 2px solid var(--border);
    border-radius: 12px !important;
    padding: 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(33, 124, 127, 0.1) !important;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
}

.btn-prev, .btn-next {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    background-color: var(--text-color);
    color: white;
    border: none;
}

.btn-prev {
    background: var(--background);
    color: var(--text);
}

.btn-next, .btn-prev:not(:disabled) {
    background: var(--primary);
    color: white;
}

.alert-popup {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Form controls specifics */
.form-check {
    margin-bottom: 1rem;
}

.form-check-label {
    color: var(--text);
    font-size: 1rem;
    padding-left: 0.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.invalid-feedback {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.error {
    color: var(--error);
}

.training-checkbox-container {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .form-container {
        margin: 2rem auto;
    }

    .question-card {
        padding: 2rem 1.5rem;
    }

    .form-label {
        font-size: 1.2rem!important;
    }

    .btn-prev, .btn-next {
        padding: 0.8rem 1.5rem;
    }
}

.training-option {
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.training-option:has(.training-checkbox:checked) {
    border-left-color: #0d6efd;
}

.sessions-grid {
    display: grid;
    gap: 1rem;
}

.session-info {
    display: flex;
    flex-direction: column;
}

.session-dates {
    font-weight: 500;
}

.session-location {
    font-size: 0.875rem;
    color: #6c757d;
}

.financing-decision-tree {
    margin-top: 1rem;
}

/* Success Message */
#successMessage h4 {
    font-size: 2rem;
    color: var(--text-color);
}

#successMessage p {
    font-size: 1.2rem;
    color: var(--text-color);
}
