/* ----------------------------------------------------------------------
   MAIN LAYOUT & CONTAINERS
   ---------------------------------------------------------------------- */

.bg-registrace {
    background: var(--bg-gradient-registrace);
    box-shadow: 0 4px 32px 0 rgba(100, 180, 100, 0.10), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    padding: 20px;
    margin: 32px auto;
    max-width: 1100px;
    position: relative;
    /* Fallback styles integrated */
    background-size: cover;
    background-position: center center;
}

.registrace-div {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem 3rem 1rem;
    margin: 0 auto;
}

.registration-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px 0 rgba(0, 0, 0, 0.10), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    margin: 0;
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 1100px;
    word-wrap: break-word;
    transition: box-shadow 0.2s;
}

/* Logos & Headers */
.registration-logos {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2.5rem;
    text-align: right;

    position: relative;
    top: -100px;
    height: 60px;
    margin-bottom: -60px;
}

.registration-logos img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    aspect-ratio: 1/1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
    background: #fff;
    border-radius: 12px;
    padding: 0.2rem;
    display: block;
}

.registrace-div h3 {
    color: var(--color-primary);
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 1.2em;
    text-align: left;
    letter-spacing: 0.01em;
}

.registrace-div h2 {
    color: var(--color-primary);
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 1.2em;
    text-align: left;
    letter-spacing: 0.01em;
    display: block;
    width: 100%;
    clear: both;
}

.registration-card h4,
.registrace-div h4 {
    font-size: 1.08em;
    margin-top: 0.7em;
    margin-bottom: 0.7em;
    display: block;
    width: 100%;
    clear: both;
}

.section-heading {
    width: 100%;
    display: block;
}

.section-heading .section-title,
.section-heading .section-subtitle {
    margin-bottom: 0.5rem;
}

/* ----------------------------------------------------------------------
   FORMS & INPUTS
   ---------------------------------------------------------------------- */

.registrace-div form {
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.registrace-div label {
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3em;
    letter-spacing: 0.01em;
}

/* Unified Input Styling */
.registrace-div input[type="text"],
.registrace-div input[type="email"],
.registrace-div input[type="number"],
.registrace-div input[type="password"],
.registrace-div input[type="tel"],
.registrace-div>select,
.registrace-div textarea {
    border-radius: 12px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    padding: 0.3em 0.5em;
    color: #111 !important;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
}

.registrace-div input:focus,
.registrace-div>select:focus,
.registrace-div textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    background: var(--input-bg-focus);
}

/* Validation States */
.is-invalid,
select.is-invalid,
.form-select.is-invalid,
.choices.is-invalid {
    border: 1.5px solid var(--color-danger) !important;
    background-color: var(--bg-danger-light) !important;
    box-shadow: none !important;
}

.choices.is-invalid {
    border-radius: 12px;
}

.choices.is-invalid .choices__inner {
    background-color: transparent !important;
    box-shadow: none !important;
}

.gdpr-invalid .form-check-input {
    border: 2px solid var(--color-danger) !important;
    background-color: var(--bg-danger-light) !important;
    box-shadow: none !important;
}

.gdpr-invalid .form-text {
    color: var(--color-danger) !important;
    font-weight: 600;
}

/* Date of Birth Wrapper */
#dob-wrapper {
    border-radius: 12px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 38px;
    padding: 0 !important;
    margin: 0;
    box-shadow: 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
    overflow: visible;
}

#dob-wrapper .form-select {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    padding: 0.35rem 0.5rem;
    margin: 0;
}

#dob-wrapper .form-select:not(:last-child) {
    border-right: 1px solid var(--input-border);
}

#dob-year.form-select {
    flex: 1.3 1 0;
}

#dob-day.form-select {
    flex: 0.9 1 0;
}

/* Buttons */
.registrace-div button,
.registrace-div input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 1.15em;
    font-weight: 600;
    padding: 0.7em 2.2em;
    margin-top: 1.2em;
    box-shadow: 0 2px 8px 0 rgba(100, 180, 100, 0.10);
    transition: background 0.4s, box-shadow 0.2s;
    cursor: pointer;
}

.registrace-div button:hover,
.registrace-div input[type="submit"]:hover {
    background: #2f984c;
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(100, 180, 100, 0.18);
}

/* Choices.js Overrides */
.registrace-div .choices__inner,
.registrace-div .choices__list--single,
.registrace-div .choices__item,
.registrace-div .choices__input,
.registrace-div .choices__list--dropdown .choices__item {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    color: black !important;
}

.registration-card table.program-table .choices__list--dropdown,
.registration-card table.program-table .choices__list[aria-expanded] {
    z-index: 2000;
}

/* Payment Section */
.payment-price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.payment-method-col {
    flex: 1 1 440px;
    min-width: 260px;
    max-width: 440px;
    width: 100%;
}

.payment-options {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
}

.payment-option-row {
    width: 100%;
    max-width: 440px;
    margin-bottom: 0;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.final-price-col {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 340px;
}

.final-price-wide {
    flex-grow: 1;
    min-width: 220px;
    width: 100%;
    margin-left: auto;
    margin-right: 0;
    display: block;
}

.credit-card-tax-part {
    color: inherit;
    font-weight: 600;
    transition: color .2s ease, font-weight .2s ease;
}

.credit-card-tax-part.active {
    color: var(--color-danger);
    font-weight: 700;
}

/* ----------------------------------------------------------------------
   TABLES
   ---------------------------------------------------------------------- */

.registrace-div table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto 24px auto;
    background: #fff;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.07), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
    border-radius: 18px;
    overflow: hidden;
    font-size: 1.1em;
    color: #222;
    padding: 0;
    transition: box-shadow 0.2s;
    table-layout: auto;
}

.registrace-div th {
    background: var(--table-header-bg);
    color: var(--color-primary);
    font-weight: 700;
    padding: 12px 18px;
    border-bottom: 1.5px solid var(--input-border);
    text-align: left;
    vertical-align: top;
}

.registrace-div td {
    padding: 10px 18px;
    border-bottom: 1px solid var(--table-border-light);
    font-size: 1em;
    vertical-align: middle;
    transition: background 0.2s;
}

.registrace-div tr:last-child td {
    border-bottom: none;
}

.registrace-div tr:hover td {
    background: var(--table-row-hover);
}

/* Vertically center all table headers globally */
th,
.table th,
.table thead th,
.table-light th {
    vertical-align: middle !important;
}

/* Column Widths (Default) */
.registrace-div table th:nth-child(1),
.registrace-div table td:nth-child(1) {
    width: 28%;
    min-width: 120px;
}

.registrace-div table th:nth-child(2),
.registrace-div table td:nth-child(2) {
    width: 26%;
    min-width: 100px;
}

.registrace-div table.accommodation-table th:nth-child(4),
.registrace-div table.accommodation-table td:nth-child(4) {
    width: 22%;
    min-width: 100px;
    text-align: right;
}

/* Accommodation Table Specifics */
.registration-card table.accommodation-table th:nth-child(1),
.registration-card table.accommodation-table td:nth-child(1) {
    width: 30%;
}

.registration-card table.accommodation-table th:nth-child(2),
.registration-card table.accommodation-table td:nth-child(2) {
    width: 18%;
}

.accommodation-heading-row {
    display: block;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    clear: both;
}

/* ----------------------------------------------------------------------
   MODALS
   ---------------------------------------------------------------------- */

/* Overlay & Animation */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1060 !important;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal.show {
    display: block !important;
    opacity: 1 !important;
}

.modal.show .modal-dialog {
    transform: translate(0, 0) !important;
}

.modal.fade .modal-dialog {
    transform: none !important;
    transition: none !important;
}

.modal-backdrop {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal-backdrop.show {
    opacity: .5 !important;
    z-index: 1050 !important;
}

/* Dialog Box */
.modal-dialog {
    margin: 24px auto;
    width: 100%;
    max-width: 800px;
}

.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    min-height: calc(100vh - 48px) !important;
}

.modal-dialog-centered .modal-content {
    width: 100%;
}

.modal-content {
    background-color: #ffffff;
    border: none;
    border-radius: 14px;
    box-shadow: var(--modal-shadow);
    overflow: hidden;
}

.modal-header {
    background: var(--color-primary);
    color: #ffffff;
    padding: 16px 20px 6px 20px;
    border: none;
}

.modal-title {
    font-weight: 650;
    letter-spacing: 0.2px;
    color: #ffffff;
    font-size: 1.35rem;
}

.modal-body {
    padding: 18px 20px;
}

.modal-footer {
    background: #f6f8fa;
    border: none;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#errorModalBody ul {
    margin: 0 0 0 1rem;
    padding: 0;
}

#errorModalBody li {
    margin: 6px 0;
}

.btn-close {
    width: 1.25rem;
    height: 1.25rem;
    background: none;
    border: 0;
    opacity: .9;
    color: #fff;
}

.btn-close:before {
    content: '\00d7';
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    color: #fff;
}

.btn-close:hover {
    opacity: 1;
}

.btn.btn-success {
    background-color: var(--color-primary);
    color: #fff !important;
}

.btn.btn-success:hover {
    background-color: #2f984c !important;
    border-color: #277f41 !important;
}

/* ----------------------------------------------------------------------
   MEDIA QUERIES (Organized by Breakpoint)
   ---------------------------------------------------------------------- */

@media (max-width: 991px) {
    #feeOptions {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    #feeOptions .fee-option {
        display: block;
        line-height: 1.3;
    }

    #feeOptions .fee-option span {
        display: inline-block;
    }
}

@media (max-width: 923px) {
    .bg-registrace {
        padding: 20px 0 16px 0;
        border-radius: 16px;
    }

    .registrace-div {
        padding: 1.5rem 0.5rem 2rem 0.5rem;
    }

    .registration-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .registration-logos {
        gap: 1.2rem;
    }

    .registration-logos img {
        max-width: 75px;
        max-height: 75px;
    }

    .registrace-div h3 {
        font-size: 1.3em;
    }

    .registrace-div h2 {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .bg-registrace {
        background-position: left;
    }

    .registrace-div {
        width: 100%;
        padding: 20px;
    }

    /* Responsive Table Logic */
    .registrace-div table {
        table-layout: fixed;
        font-size: 0.90em;
        word-break: break-word;
        hyphens: auto;
    }

    .registrace-div table th:nth-child(1),
    .registrace-div table td:nth-child(1),
    .registrace-div table th:nth-child(2),
    .registrace-div table td:nth-child(2) {
        width: auto;
        min-width: 0;
    }

    .registrace-div th {
        padding: 9px 12px;
        line-height: 1.30;
    }

    .registrace-div td {
        padding: 7px 12px;
        line-height: 1.34;
    }

    .registrace-div th,
    .registrace-div td {
        white-space: normal;
        overflow-wrap: anywhere;
        word-wrap: break-word;
    }

    /* Bootstrap Table Responsive Overrides */
    .table-bordered {
        border: 1px solid #ddd !important;
    }

    .table-responsive>.table {
        margin: 0 auto 24px auto;
    }

    .table-responsive {
        border: none !important;
    }

    .table-responsive>.table>thead>tr>th,
    .table-responsive>.table>thead>tr>td,
    .table-responsive>.table>tbody>tr>th,
    .table-responsive>.table>tbody>tr>td,
    .table-responsive>.table>tfoot>tr>th,
    .table-responsive>.table>tfoot>tr>td {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    /* Accommodation Table Mobile Column Widths */
    .registration-card table.accommodation-table th:nth-child(1),
    .registration-card table.accommodation-table td:nth-child(1) {
        width: 20% !important;
    }

    .registration-card table.accommodation-table th:nth-child(2),
    .registration-card table.accommodation-table td:nth-child(2) {
        width: 23% !important;
    }

    .registration-card table.accommodation-table th:nth-child(3),
    .registration-card table.accommodation-table td:nth-child(3) {
        width: 23% !important;
    }

    .registration-card table.accommodation-table th:nth-child(4),
    .registration-card table.accommodation-table td:nth-child(4) {
        width: 18% !important;
    }

    .registration-card table.accommodation-table th:nth-child(5),
    .registration-card table.accommodation-table td:nth-child(5) {
        width: 16% !important;
    }

    /* Heading Adjustments */
    .registrace-div h3 {
        margin-bottom: 0.3em;
    }

    .registration-logos {
        margin-bottom: 0.3em;
        text-align: center !important;
        position: static !important;
        top: auto !important;
        height: auto !important;
        margin-top: 20px !important;
    }

    h5 {
        margin-top: 30px !important;
    }
}

@media (max-width: 700px) {
    .payment-price-row {
        gap: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    .final-price-col,
    .payment-method-col {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .registrace-div table {
        font-size: 0.85em;
    }

    .registrace-div th {
        padding: 7px 11px;
        line-height: 1.28;
    }

    .registrace-div td {
        padding: 6px 11px;
        line-height: 1.32;
    }

    .submit-row {
        text-align: center !important;
    }

    /* Merged from 623px */
}

@media (max-width: 600px) {
    .gdpr-br {
        display: none !important;
    }
}

@media (max-width: 560px) {
    .registrace-div table {
        font-size: 0.80em;
    }

    .registrace-div th {
        padding: 6px 9px;
        line-height: 1.26;
    }

    .registrace-div td {
        padding: 5px 9px;
        line-height: 1.30;
    }
}

@media (max-width: 480px) {
    .registrace-div table {
        font-size: 0.75em;
    }

    .registrace-div th {
        padding: 5px 8px;
        line-height: 1.22;
    }

    .registrace-div td {
        padding: 4px 8px;
        line-height: 1.26;
    }
}

@media (max-width: 410px) {
    .registrace-div table {
        font-size: 0.70em;
    }

    .registrace-div th {
        padding: 4px 7px;
        line-height: 1.20;
        font-weight: 600;
    }

    .registrace-div td {
        padding: 3px 7px;
        line-height: 1.22;
    }

    /* Modal Shrink */
    .modal-body table {
        font-size: 0.72em !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .modal-body th,
    .modal-body td {
        padding: 3px 4px !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    .modal-title {
        font-size: 1em !important;
    }

    .modal-content {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    /* Button Shrink */
    .registrace-div button {
        padding: 0.7em 1.2em;
    }
}