

/* Keep the existing site/main container width. Only improve inner spacing and readability. */
.general-content {
    padding: 30px 34px 36px;
    box-sizing: border-box;
}

/* Account access card: roomy, bordered, and aligned like the mockup. */
.confirmation-box {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(520px, 2.15fr);
    column-gap: 34px;
    row-gap: 10px;
    align-items: center;
    margin: 0 0 26px;
    padding: 28px 30px;
    border: 1px solid rgba(45, 74, 105, 0.22);
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.confirmation-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.confirmation-text {
    grid-column: 1;
    margin: 0;
    line-height: 1.7;
}

.error-message {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.contact-form {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(190px, 0.82fr) auto;
    gap: 18px;
    align-items: end;
    margin: 0;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-field input {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1px solid rgba(45, 74, 105, 0.22);
    border-radius: 7px;
    box-sizing: border-box;
}

.contact-submit-row {
    display: flex;
    align-items: end;
}

.contact-submit-row .start-button {
    min-height: 52px;
    padding: 13px 22px;
    white-space: nowrap;
}

/* Summary card spacing. */
.registration-summary-card {
    margin: 0 0 22px;
    padding: 18px 22px;
    border: 1px solid rgba(45, 74, 105, 0.18);
    border-radius: 10px;
    background: #fff;
}

/* The table wrapper keeps the original width but gives inner breathing room. */
.desktop-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
}

/* Each registration becomes its own bordered readable card. */
.desktop-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 22px;
    border: 1px solid rgba(45, 74, 105, 0.22);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.desktop-table table:last-child {
    margin-bottom: 0;
}

.desktop-table thead th {
    padding: 24px 18px 16px;
    text-align: left;
    vertical-align: top;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    border-bottom: 0;
}

.desktop-table tbody td {
    padding: 12px 18px 28px;
    vertical-align: top;
    line-height: 1.65;
    border-bottom: 0;
}

.desktop-table tbody tr.summary-row td {
    border-bottom: 1px solid rgba(45, 74, 105, 0.14);
}

.desktop-table tbody tr.summary-row:hover td {
    background: rgba(45, 74, 105, 0.025);
}

.summary-row small {
    display: inline-block;
    margin-top: 4px;
    line-height: 1.45;
}

.status-paid-text {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
}

.pay.start-button {
    min-width: 110px;
    padding: 14px 22px;
    line-height: 1.15;
    text-align: center;
}

/* Expanded details get their own padded section. */
.details-row .details-content {
    padding: 24px 26px 30px !important;
    background: #fff;
    border-bottom: 0 !important;
}

.registration-summary-item {
    padding: 0;
}

.registration-summary-item > p {
    margin: 0 0 18px;
    font-weight: 800;
    font-size: 1.05rem;
}

.parent-history-blocks {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.parent-history-block {
    border-radius: 10px;
    padding: 22px 24px;
    border: 1px solid rgba(45, 74, 105, 0.18);
    background: #f8f8f8;
    line-height: 1.6;
}

.parent-history-payment {
    background: #edf7ed;
    border-color: #a8d5a8;
}

.parent-history-carryover {
    background: #eef5ff;
    border-color: #b8d4f5;
}

.parent-history-unassigned {
    background: #fff8e8;
    border-color: #ead7a5;
}

.parent-history-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.parent-history-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 12px;
    line-height: 1.65;
}

.parent-history-block ul {
    margin: 12px 0 0 20px;
    padding: 0;
}

.parent-history-block li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Modal must stay hidden until opened by JS. */
.payment-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.payment-modal {
    width: min(520px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.modal-close {
    cursor: pointer;
}

.register-note {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid rgba(45, 74, 105, 0.14);
    border-radius: 8px;
}

@media (max-width: 1000px) {
    .general-content {
        padding: 24px;
    }

    .confirmation-box {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .confirmation-text,
    .contact-form {
        grid-column: 1;
        grid-row: auto;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-submit-row .start-button {
        width: 100%;
    }

    .desktop-table table {
        min-width: 860px;
    }

    .desktop-table thead th {
        padding: 20px 14px 12px;
    }

    .desktop-table tbody td {
        padding: 10px 14px 24px;
    }
}

@media (max-width: 640px) {
    .general-content {
        padding: 16px;
    }

    .confirmation-box {
        padding: 22px;
    }
}

@media print {
    .payment-modal-overlay,
    .nav-container,
    .menu-button,
    .pay,
    .modal-close,
    script {
        display: none !important;
    }
}


/* --------------------------------------------------------------------------
   NO-CUTOFF RESPONSIVE PATCH
   Keeps the original main container width, but prevents inner content from
   escaping cards on desktop and mobile.
--------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.main-wrapper,
.general-wrapper,
.general-content,
.confirmation-box,
.registration-summary-card,
.desktop-table,
.desktop-table table,
.payment-modal,
.parent-history-block,
.register-note {
    max-width: 100%;
}

.general-content {
    padding: 30px 34px 36px;
    overflow: hidden;
}

/* Account card: same container width, but flexible inner columns. */
.confirmation-box {
    width: 100%;
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
    column-gap: 34px;
    overflow: hidden;
}

.confirmation-box > *,
.contact-form,
.form-field,
.contact-submit-row {
    min-width: 0;
}

.contact-form {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(135px, 160px);
    gap: 16px;
}

.form-field input {
    max-width: 100%;
}

.contact-submit-row,
.contact-submit-row .start-button {
    width: 100%;
    max-width: 100%;
}

.contact-submit-row .start-button,
.pay.start-button {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

/* Results/table: readable borders without forcing the page wider. */
.desktop-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.desktop-table table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.desktop-table th,
.desktop-table td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.desktop-table th:nth-child(1),
.desktop-table td:nth-child(1) { width: 15%; }
.desktop-table th:nth-child(2),
.desktop-table td:nth-child(2) { width: 14%; }
.desktop-table th:nth-child(3),
.desktop-table td:nth-child(3) { width: 15%; }
.desktop-table th:nth-child(4),
.desktop-table td:nth-child(4) { width: 13%; }
.desktop-table th:nth-child(5),
.desktop-table td:nth-child(5) { width: 20%; }
.desktop-table th:nth-child(6),
.desktop-table td:nth-child(6) { width: 15%; }
.desktop-table th:nth-child(7),
.desktop-table td:nth-child(7) { width: 8%; }

.details-content,
.registration-summary-item,
.parent-history-block,
.parent-history-subtitle,
.parent-history-block li {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Button column can be narrow without escaping. */
.pay.start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    max-width: 120px;
    padding-left: 12px;
    padding-right: 12px;
}

@media (max-width: 1180px) {
    .confirmation-box {
        grid-template-columns: 1fr;
    }

    .confirmation-text,
    .contact-form {
        grid-column: 1;
        grid-row: auto;
    }

    .contact-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .contact-submit-row {
        grid-column: 1 / -1;
    }

    .contact-submit-row .start-button {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .general-content {
        padding: 20px;
    }

    /* On smaller screens, remove the wide-table requirement and display each
       registration as a stacked card so nothing gets cut off. */
    .desktop-table {
        overflow-x: visible;
    }

    .desktop-table table,
    .desktop-table thead,
    .desktop-table tbody,
    .desktop-table tr,
    .desktop-table th,
    .desktop-table td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
    }

    .desktop-table table {
        table-layout: auto;
    }

    .desktop-table thead {
        display: none;
    }

    .desktop-table tbody td {
        padding: 10px 18px;
        border-bottom: 0;
    }

    .desktop-table tbody td::before {
        display: block;
        margin-bottom: 4px;
        font-weight: 800;
        color: inherit;
    }

    .desktop-table tbody .summary-row td:nth-child(1)::before { content: "Student"; }
    .desktop-table tbody .summary-row td:nth-child(2)::before { content: "Description"; }
    .desktop-table tbody .summary-row td:nth-child(3)::before { content: "Day/Time"; }
    .desktop-table tbody .summary-row td:nth-child(4)::before { content: "Instructor"; }
    .desktop-table tbody .summary-row td:nth-child(5)::before { content: "Price"; }
    .desktop-table tbody .summary-row td:nth-child(6)::before { content: "Lessons Left"; }
    .desktop-table tbody .summary-row td:nth-child(7)::before { content: "Actions"; }

    .desktop-table tbody tr.summary-row td:first-child {
        padding-top: 20px;
    }

    .desktop-table tbody tr.summary-row td:last-child {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(45, 74, 105, 0.14);
    }

    .details-row .details-content {
        padding: 20px !important;
    }

    .pay.start-button {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .general-content {
        padding: 14px;
    }

    .confirmation-box {
        padding: 20px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-submit-row {
        grid-column: 1;
    }

    .desktop-table tbody td {
        padding-left: 14px;
        padding-right: 14px;
    }
}



/* --------------------------------------------------------------------------
   FINAL ORIGINAL-WIDTH + NO-CUTOFF PATCH
   Keeps the desktop container at the previous centered width while preventing
   form/table content from escaping on desktop and mobile.
--------------------------------------------------------------------------- */
* , *::before, *::after {
    box-sizing: border-box;
}

.main-wrapper {
    width: 100%;
    max-width: 980px !important;
    margin: 34px auto 22px !important;
    padding: 0 16px !important;
}

.main-wrapper > h1 {
    text-align: center;
    margin: 0 0 22px;
}

.general-wrapper,
.general-content {
    width: 100%;
    max-width: 100%;
}

.general-content {
    padding: 28px 30px 34px !important;
    overflow: hidden;
}

.confirmation-box {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr) !important;
    column-gap: 28px !important;
    padding: 28px 30px !important;
    overflow: hidden;
}

.confirmation-box > *,
.contact-form,
.form-field,
.contact-submit-row {
    min-width: 0;
    max-width: 100%;
}

.contact-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) minmax(132px, 150px) !important;
    gap: 14px !important;
}

.form-field input {
    width: 100%;
    max-width: 100%;
}

.contact-submit-row,
.contact-submit-row .start-button {
    width: 100%;
    max-width: 100%;
}

.contact-submit-row .start-button,
.pay.start-button {
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center;
}

.desktop-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.desktop-table table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.desktop-table th,
.desktop-table td,
.details-content,
.registration-summary-item,
.parent-history-block,
.parent-history-subtitle,
.parent-history-block li {
    overflow-wrap: anywhere;
    word-break: normal;
}

.desktop-table th:nth-child(1),
.desktop-table td:nth-child(1) { width: 15%; }
.desktop-table th:nth-child(2),
.desktop-table td:nth-child(2) { width: 14%; }
.desktop-table th:nth-child(3),
.desktop-table td:nth-child(3) { width: 15%; }
.desktop-table th:nth-child(4),
.desktop-table td:nth-child(4) { width: 13%; }
.desktop-table th:nth-child(5),
.desktop-table td:nth-child(5) { width: 19%; }
.desktop-table th:nth-child(6),
.desktop-table td:nth-child(6) { width: 16%; }
.desktop-table th:nth-child(7),
.desktop-table td:nth-child(7) { width: 8%; }

.pay.start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 116px;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 1040px) {
    .main-wrapper {
        max-width: calc(100% - 32px) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .confirmation-box {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .confirmation-text,
    .contact-form {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .contact-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    }

    .contact-submit-row {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .main-wrapper {
        max-width: calc(100% - 24px) !important;
        margin-top: 24px !important;
    }

    .general-content {
        padding: 18px !important;
    }

    .desktop-table {
        overflow-x: visible;
    }

    .desktop-table table,
    .desktop-table thead,
    .desktop-table tbody,
    .desktop-table tr,
    .desktop-table th,
    .desktop-table td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
    }

    .desktop-table table {
        table-layout: auto;
    }

    .desktop-table thead {
        display: none;
    }

    .desktop-table tbody td {
        padding: 10px 18px;
        border-bottom: 0;
    }

    .desktop-table tbody td::before {
        display: block;
        margin-bottom: 4px;
        font-weight: 800;
    }

    .desktop-table tbody .summary-row td:nth-child(1)::before { content: "Student"; }
    .desktop-table tbody .summary-row td:nth-child(2)::before { content: "Description"; }
    .desktop-table tbody .summary-row td:nth-child(3)::before { content: "Day/Time"; }
    .desktop-table tbody .summary-row td:nth-child(4)::before { content: "Instructor"; }
    .desktop-table tbody .summary-row td:nth-child(5)::before { content: "Price"; }
    .desktop-table tbody .summary-row td:nth-child(6)::before { content: "Lessons Left"; }
    .desktop-table tbody .summary-row td:nth-child(7)::before { content: "Actions"; }

    .desktop-table tbody tr.summary-row td:first-child {
        padding-top: 20px;
    }

    .desktop-table tbody tr.summary-row td:last-child {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(45, 74, 105, 0.14);
    }

    .details-row .details-content {
        padding: 20px !important;
    }

    .pay.start-button {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .main-wrapper {
        max-width: calc(100% - 16px) !important;
    }

    .general-content {
        padding: 14px !important;
    }

    .confirmation-box {
        padding: 20px !important;
    }

    .contact-form {
        grid-template-columns: 1fr !important;
    }

    .contact-submit-row {
        grid-column: 1;
    }
}



/* --------------------------------------------------------------------------
   FINAL DESKTOP READABILITY PATCH
   Keeps the original-width container, but gives the Actions column enough
   room so headers/buttons do not get clipped on desktop.
--------------------------------------------------------------------------- */
@media (min-width: 901px) {
    .main-wrapper {
        max-width: 980px !important;
    }

    .general-content {
        padding-left: 28px !important;
        padding-right: 28px !important;
    }

    .desktop-table {
        overflow-x: visible !important;
    }

    .desktop-table table {
        table-layout: fixed !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .desktop-table thead th,
    .desktop-table tbody td {
        padding-left: 14px !important;
        padding-right: 14px !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    .desktop-table th:nth-child(1),
    .desktop-table td:nth-child(1) { width: 15% !important; }

    .desktop-table th:nth-child(2),
    .desktop-table td:nth-child(2) { width: 13% !important; }

    .desktop-table th:nth-child(3),
    .desktop-table td:nth-child(3) { width: 14% !important; }

    .desktop-table th:nth-child(4),
    .desktop-table td:nth-child(4) { width: 12% !important; }

    .desktop-table th:nth-child(5),
    .desktop-table td:nth-child(5) { width: 17% !important; }

    .desktop-table th:nth-child(6),
    .desktop-table td:nth-child(6) { width: 17% !important; }

    .desktop-table th:nth-child(7),
    .desktop-table td:nth-child(7) { width: 12% !important; }

    .desktop-table td:nth-child(7),
    .desktop-table th:nth-child(7) {
        text-align: left;
    }

    .pay.start-button {
        width: 100% !important;
        max-width: 112px !important;
        min-width: 88px !important;
        padding: 12px 10px !important;
        line-height: 1.15 !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        white-space: normal !important;
    }
}