/* Course selector */

.course-choice-header {
    max-width: 820px;
    margin: 0 auto 18px;
    text-align: center;
}

.course-choice-header h1 {
    margin-bottom: 8px;
    color: var(--color-bg-end);
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
}

.course-choice-header p {
    color: var(--color-card-muted);
    font-size: 16px;
    line-height: 1.45;
}

.selector-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.selector-card {
    display: grid;
    grid-template-columns: 64px 1fr 160px;
    align-items: center;
    width: 100%;
    min-height: 96px;
    padding: 14px 26px;
    border: 2px solid #d8deea;
    border-radius: 24px;
    background: #ffffff;
    color: var(--color-card-text);
    text-align: left;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.selector-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.selector-card.is-selected {
    border-color: var(--color-bg-mid);
    box-shadow: 0 18px 42px rgba(8, 32, 77, 0.18);
}

.selector-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    color: var(--color-bg-mid);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.selector-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 64px;
    padding-right: 18px;
}

.selector-card h2 {
    margin-bottom: 5px;
    color: var(--color-bg-mid);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.selector-card p {
    margin: 0;
    color: var(--color-card-muted);
    font-size: 14px;
    line-height: 1.35;
}

.selector-price {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 140px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--color-bg-mid);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

/* Checkout layout by step */

body[data-checkout-step="1"] .checkout-layout {
    grid-template-columns: 1fr;
}

body[data-checkout-step="1"] .register-form {
    max-width: 100%;
}

body[data-checkout-step="1"] .order-summary-card,
body[data-checkout-step="1"] .course-info-action-card {
    display: none;
}

body[data-checkout-step="2"] .checkout-layout,
body[data-checkout-step="3"] .checkout-layout,
body[data-checkout-step="4"] .checkout-layout {
    align-items: flex-start;
}

.order-summary-card,
.course-info-action-card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: flex-start;
}

.course-info-action-card p {
    margin-bottom: 22px;
    color: var(--color-card-muted);
    font-size: 15px;
    line-height: 1.6;
}

.checkout-step-panel[data-step-panel="1"] {
    width: 100%;
}

/* Selected course detail */

.selected-course-detail {
    margin-bottom: 28px;
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #d8deea;
}

.selected-course-detail h2 {
    margin-bottom: 18px;
    color: var(--color-bg-mid);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.selected-course-content {
    display: grid;
    gap: 18px;
}

.selected-course-content p,
.selected-course-content li {
    color: var(--color-card-muted);
    font-size: 15px;
    line-height: 1.6;
}

.selected-course-content h3 {
    margin-top: 10px;
    color: var(--color-bg-end);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.selected-course-content ul {
    display: grid;
    gap: 6px;
    padding-left: 22px;
}

.checkout-layout {
    gap: 28px;
}

@media (max-width: 1200px) {
    .selector-card {
        grid-template-columns: 58px 1fr 145px;
        min-height: 90px;
        padding: 13px 22px;
    }

    .selector-price {
        width: 132px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .course-choice-header h1 {
        font-size: 30px;
    }

    .course-choice-header p {
        font-size: 15px;
    }

    .selector-card {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: auto;
        padding: 20px;
        text-align: center;
    }

    .selector-icon {
        margin-bottom: 12px;
    }

    .selector-content {
        min-height: 0;
        padding-right: 0;
    }

    .selector-price {
        width: 100%;
        margin-top: 16px;
    }

    .selected-course-detail {
        padding: 22px;
    }

    .selected-course-detail h2 {
        font-size: 24px;
    }

    .order-summary-card,
    .course-info-action-card {
        position: static;
    }
}

.field-error {
    border-color: #d93025 !important;
    background: #fff5f5 !important;
}

/* Validation messages */

.checkout-error-message {
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid #f2b8b5;
    border-radius: 16px;
    background: #fff5f5;
    color: #b3261e;
    font-size: 15px;
    line-height: 1.5;
}

.checkout-error-message strong {
    display: block;
    margin-bottom: 6px;
}

.checkout-error-message ul {
    margin: 0;
    padding-left: 20px;
}

/* Final summary */

.final-summary-card {
    padding: 28px;
    border: 1px solid #d8deea;
    border-radius: 24px;
    background: #ffffff;
}

.final-summary-card h2 {
    margin-bottom: 24px;
    color: var(--color-bg-mid);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.final-summary-section {
    margin-top: 24px;
}

.final-summary-section h3 {
    margin-bottom: 14px;
    color: var(--color-bg-end);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.final-course-summary {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f8fbff;
    color: var(--color-card-text);
}

.final-course-summary strong {
    color: var(--color-bg-mid);
    font-size: 17px;
}

.final-summary-list {
    display: grid;
    gap: 10px;
}

.final-summary-list div {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #e5eaf2;
}

.final-summary-list dt {
    color: var(--color-card-muted);
    font-weight: 700;
}

.final-summary-list dd {
    margin: 0;
    color: var(--color-card-text);
}

.final-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 2px solid #d8deea;
    font-size: 20px;
}

.final-summary-total strong {
    color: var(--color-bg-mid);
}

.final-summary-consent {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f8fbff;
    color: var(--color-card-text);
    font-size: 15px;
    line-height: 1.5;
}

.final-summary-consent input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.final-participants-table-wrap {
    overflow-x: auto;
}

.final-participants-table {
    width: 100%;
    border-collapse: collapse;
}

.final-participants-table th,
.final-participants-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5eaf2;
    text-align: left;
}

.final-participants-table th {
    color: var(--color-bg-end);
    background: #f8fbff;
    font-weight: 700;
}

.final-participants-table td {
    color: var(--color-card-text);
}

@media (max-width: 768px) {
    .final-summary-card {
        padding: 22px;
    }

    .final-summary-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .final-summary-total {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* Participants */

.participant-card {
    padding: 24px;
    border: 1px solid #d8deea;
    border-radius: 24px;
    background: #ffffff;
}

.participant-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.participant-header h2 {
    color: var(--color-bg-mid);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    flex: 1;

}

.participant-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: center;
}

.form-field--full {
    grid-column: auto;
}

.participant-grid .register-field {
    width: 100%;
}

.participant-grid .register-field input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;

    border: 1px solid #d8deea;
    border-radius: 16px;

    background: #ffffff;
    color: var(--color-card-text);

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.participant-grid .register-field input:focus {
    outline: none;
    border-color: var(--color-primary);

    box-shadow: 0 0 0 4px rgba(47, 125, 246, 0.12);
}

.remove-participant-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-shrink: 0;
    white-space: nowrap;

    min-width: 190px;
    height: 42px;

    padding: 0 18px;

    border: none;
    border-radius: 999px;

    background: #ffe9e9;
    color: #d93025;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.remove-participant-button:hover {
    background: #ffd7d7;
    transform: translateY(-1px);
}

.remove-participant-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    font-size: 18px;
    line-height: 1;
}

@media (max-width: 768px) {
    .participant-card {
        padding: 20px;
    }

    .participant-grid {
        grid-template-columns: 1fr;
    }

    .participant-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-header h2 {
        font-size: 21px;
    }

    .remove-participant-button {
        width: 100%;
        justify-content: center;
    }
}

.delete-order-button {
    width: 100%;
    min-height: 56px;

    margin-top: 12px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d92d20;
    border-radius: 16px;

    background: #ffffff;
    color: #d92d20;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.delete-order-button:hover {
    background: #d92d20;
    color: #ffffff;
}

.terms-link {
    color: #005fec;
    font-weight: 700;
    text-decoration: underline;
}

.terms-link:hover {
    color: #003f9e;
}

/* Legal modal */

body.legal-modal-open {
    overflow: hidden;
}

.legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 32px;

    background: rgba(5, 18, 42, 0.68);
    backdrop-filter: blur(4px);
}

.legal-modal-overlay.is-open {
    display: flex;
}

.legal-modal-window {
    width: min(1100px, 94vw);
    height: min(86vh, 900px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-radius: 24px;
    background: #ffffff;
    color: var(--color-card-text);

    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.legal-modal-header {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 24px;

    border-bottom: 1px solid #d8deea;
    background: #ffffff;
}

.legal-modal-title {
    margin: 0;

    color: var(--color-bg-mid);

    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.legal-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 40px;
    padding: 0 14px;

    border: 1px solid #d8deea;
    border-radius: 999px;

    background: #ffffff;
    color: var(--color-bg-mid);

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
}

.legal-modal-close:hover {
    border-color: var(--color-primary);
    background: #f3f7ff;
}

.legal-modal-close span {
    font-size: 22px;
    line-height: 1;
}

.legal-modal-frame {
    flex: 1 1 auto;

    width: 100%;
    height: 100%;

    border: none;
    background: #ffffff;
}

@media (max-width: 768px) {
    .legal-modal-overlay {
        padding: 14px;
    }

    .legal-modal-window {
        width: 100%;
        height: 90vh;
        border-radius: 18px;
    }

    .legal-modal-header {
        padding: 14px 16px;
    }

    .legal-modal-title {
        font-size: 18px;
    }

    .legal-modal-close {
        min-height: 36px;
        padding: 0 10px;
        font-size: 14px;
    }
}


.terms-agreement-label.error {
    color: #d32f2f;
    font-weight: 700;
}

.terms-agreement-label.error a {
    color: #d32f2f;
}

.terms-agreement-label.error input {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

.terms-agreement-label.error {
    color: #d32f2f;
    font-weight: 700;
    border: 2px solid #d32f2f;
    border-radius: 12px;
    padding: 12px 16px;
    background: rgba(211, 47, 47, 0.05);
}

.terms-agreement-label.error a {
    color: #d32f2f;
}

.terms-agreement-label.error input {
    outline: none;
}

.terms-agreement-label {
    display: block;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

/* ===== ARES ===== */

.ares-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.ares-input-group input,
.ares-input-group select {
    flex: 1;
}

.ares-button {
    flex-shrink: 0;
    min-width: 170px;
    white-space: nowrap;
}

.ares-status {
    display: block;
    margin-top: 8px;
    min-height: 20px;
    font-size: 0.9rem;
}

.ares-status.loading {
    color: #0d6efd;
}

.ares-status.success {
    color: #198754;
}

.ares-status.error {
    color: #dc3545;
}

.activation-card {
    max-width: 900px;
    margin: 0 auto;
}

.activation-header {
    margin-bottom: 28px;
}

.activation-header h1 {
    margin-bottom: 8px;
}

.activation-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #d8deea;
}

.activation-section h2 {
    margin: 0 0 18px;
}

.activation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.activation-field-full {
    grid-column: 1 / -1;
}

.activation-form input[readonly] {
    background: #eef2f7;
    color: #526078;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .activation-grid {
        grid-template-columns: 1fr;
    }

    .activation-field-full {
        grid-column: auto;
    }
}

/* =========================================================
   Aktivace účtu
   ========================================================= */

.activation-page {
    padding-top: 14px;
    padding-bottom: 14px;
}

.activation-card {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 24px;
}

.activation-header {
    margin-bottom: 12px;
}

.activation-header h1 {
    margin: 0 0 4px;
    font-size: 1.75rem;
    line-height: 1.1;
}

.activation-header p {
    margin: 0;
    color: #5f6f89;
}

.activation-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.activation-section {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #d8deea;
    border-radius: 16px;
    background: #ffffff;
}

.activation-section--full {
    grid-column: 1 / -1;
}

.activation-section h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.2;
}

.activation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
}

.activation-field {
    min-width: 0;
}

.activation-field--full {
    grid-column: 1 / -1;
}

.activation-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #12233f;
}

.activation-date {
    margin: 0;
    padding: 0;
    border: 0;
}

.activation-date legend {
    margin-bottom: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #12233f;
}

.activation-date-fields {
    display: grid;
    grid-template-columns: minmax(76px, 0.8fr) minmax(86px, 0.9fr) minmax(110px, 1.25fr);
    gap: 8px;
}

.activation-date-part {
    min-width: 0;
}

.activation-date-part label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #5f6f89;
}

.activation-field input,
.activation-field select,
.activation-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
    color: #12233f;
    box-sizing: border-box;
}

.activation-field input:focus,
.activation-field select:focus,
.activation-field textarea:focus {
    border-color: #1263eb;
    outline: 3px solid rgba(18, 99, 235, 0.12);
}

.activation-field .readonly-field,
.activation-field input[readonly] {
    border-color: #d2d8e1;
    background: #e9edf3;
    color: #667085;
    cursor: not-allowed;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.readonly-note {
    display: block;
    margin-top: 4px;
    font-size: 0.76rem;
    color: #7a8799;
}

.activation-field .errorlist {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.78rem;
    line-height: 1.2;
    color: #c62828;
}

.activation-field--error .password-help {
    display: none;
}

.activation-field--error input,
.activation-field--error select,
.activation-field--error textarea,
.activation-date--error input {
    border-color: #d93025;
    background: #fff7f7;
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.08);
}

.activation-field--error input:focus,
.activation-field--error select:focus,
.activation-field--error textarea:focus,
.activation-date--error input:focus {
    border-color: #b3261e;
    outline-color: rgba(217, 48, 37, 0.16);
}

.activation-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.activation-actions .button-primary {
    min-width: 210px;
}

@media (max-width: 900px) {
    .activation-layout {
        grid-template-columns: 1fr;
    }

    .activation-section--full {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .activation-card {
        padding: 20px 16px;
    }

    .activation-grid {
        grid-template-columns: 1fr;
    }

    .activation-field--full {
        grid-column: auto;
    }

    .activation-date {
        grid-column: auto;
    }

    .activation-date-fields {
        grid-template-columns: minmax(68px, 0.8fr) minmax(78px, 0.9fr) minmax(104px, 1.2fr);
    }

    .activation-actions {
        justify-content: stretch;
    }

    .activation-actions .button-primary {
        width: 100%;
    }
}

.participant-message-row {
    grid-column: 1 / -1;
    margin-top: 12px;
}

.participant-email-error {
    display: none;
    padding: 14px 16px;
    border-left: 4px solid #d32f2f;
    background: #fff3f3;
    color: #c62828;
    border-radius: 8px;
    font-size: .95rem;
    line-height: 1.5;
}

.participant-email-error:not([hidden]) {
    display: block;
}

.participant-card--error {
    border: 2px solid #d32f2f;
    background: #fff9f9;
    box-shadow: 0 0 0 4px rgba(211,47,47,.08);
}

.participant-card--error .participant-header h2 {
    color: #c62828;
}

.password-help {
    display: block;
    margin-top: 6px;
    color: #667085;
    font-size: 0.82rem;
    line-height: 1.4;
}
