/*
 * Order detail pages -- customer booking history, agent booking history and
 * the post-booking confirmation.
 *
 * All three were bare <h3> headings over borderless tables running the full
 * width of the column, with no separation between sections, and the only
 * action on the page (Pay Now) buried in the last row of the second table.
 * These rules give each section the same card treatment the booking form uses
 * and pin the summary column beside the content.
 *
 * Logical properties throughout, so one file serves both the LTR and RTL
 * stylesheets.
 */

/* ---- Section cards ------------------------------------------------- */

.detail-card {
    background: #fff;
    border: 1px solid #ecedf1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(10, 26, 60, .04), 0 1px 3px rgba(10, 26, 60, .05);
    margin-bottom: 20px;
    padding: 22px 24px;
}

.detail-card > h3 {
    font-size: 17px;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

/*
 * The tables are label/value pairs, not data grids: a quiet label, the value
 * carrying the weight, and a hairline between rows instead of zebra fill.
 */
.detail-card .table {
    margin-bottom: 0;
}

/*
 * style_en.css zebra-stripes these rows via
 * `.confirmation-details table tr:nth-of-type(2n+1)`, which paints the ROW --
 * clearing the cell background alone leaves the stripe showing through. The
 * nth-of-type here is only to match that selector's specificity.
 */
.detail-card .table > tbody > tr,
.detail-card .table > tbody > tr:nth-of-type(2n+1) {
    background: transparent;
}

.detail-card .table > tbody > tr > td {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #f1f2f5;
    padding: 11px 0;
    vertical-align: top;
}

.detail-card .table > tbody > tr:last-child > td {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-card .table > tbody > tr > td:first-child {
    color: #6e6b7b;
    font-size: 14px;
    padding-inline-end: 16px;
    white-space: nowrap;
    width: 42%;
}

.detail-card .table > tbody > tr > td:last-child {
    color: #2f3349;
    font-weight: 600;
    text-align: end;
    word-break: break-word;
}

/*
 * Document and photo thumbnails moved to public/assets/media.css, which
 * covers every image treatment on the site rather than just these pages.
 */

/* ---- Status ---------------------------------------------------------- */

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 4px 12px;
    text-transform: uppercase;
}

.status-pill--paid { background: #e6f8ef; color: #1b7a4b; }
.status-pill--confirmed { background: #e7f6fd; color: #11708f; }
.status-pill--pending { background: #fff5e2; color: #8a6116; }
.status-pill--canceled,
.status-pill--rejected { background: #fdecec; color: #a32020; }
.status-pill--default { background: #eef0f4; color: #4b5067; }

/* ---- Pay card in the summary column ---------------------------------- */

.order-pay__paid,
.order-pay__hint {
    color: #6e6b7b;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.order-pay__paid strong {
    color: #2f3349;
}

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

/* Same treatment as the booking form's notice, which lives in that page's
   own <style> block and is not available here. */
.order-pay__notice {
    background: #fff8e6;
    border: 1px solid #f3d79b;
    border-radius: 8px;
    color: #6b5420;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 0;
    padding: 10px 14px;
}

/* ---- Summary column -------------------------------------------------- */

@media (min-width: 992px) {
    .booking-aside {
        position: sticky;
        /*
         * Overridden from public/assets/sticky-aside.js when the column is
         * taller than the viewport. This value is what applies on a screen
         * tall enough to show the whole column.
         */
        top: 16px;
    }
}

/* ---- Account details shown read-only on the booking form -------------- */

/*
 * A signed-in customer is not asked for their personal details again, so the
 * booking form shows what is already on file instead of an empty card.
 * Label/value pairs, same rhythm as the order detail tables.
 */
.account-panel {
    margin-bottom: 0;
}

.account-panel__row {
    border-bottom: 1px solid #f1f2f5;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 0;
}

.account-panel__row:last-child {
    border-bottom: 0;
}

.account-panel dt {
    color: #6e6b7b;
    font-size: 14px;
    font-weight: 400;
}

.account-panel dd {
    color: #2f3349;
    font-weight: 600;
    margin: 0;
    text-align: end;
    word-break: break-word;
}

/* A blank field is information too -- it is what the booking will carry. */
.account-panel__missing {
    color: #a3a7b4;
    font-style: italic;
    font-weight: 400;
}

.account-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.account-docs__item {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-docs__label {
    color: #6e6b7b;
    font-size: 14px;
}

.account-panel__note {
    color: #6e6b7b;
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0 0;
}

.account-panel__note a {
    color: #2bc2ee;
    font-weight: 600;
    text-decoration: underline;
}

/* ---- Booking form: the collapsible "your details" card ---------------- */

.account-accordion {
    padding: 0;
}

.account-accordion__summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    list-style: none;
    padding: 18px 24px;
    /* Room for the chevron, which is drawn on the summary's trailing edge. */
    padding-inline-end: 44px;
    position: relative;
}

/* Safari draws its own triangle unless both of these are cleared. */
.account-accordion__summary::-webkit-details-marker {
    display: none;
}

.account-accordion__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.account-accordion__hint {
    color: #6e6b7b;
    flex-basis: 100%;
    font-size: 13px;
    line-height: 1.45;
}

.account-accordion__summary::after {
    border-bottom: 2px solid #6e6b7b;
    border-inline-end: 2px solid #6e6b7b;
    content: '';
    height: 9px;
    inset-inline-end: 24px;
    position: absolute;
    top: 24px;
    transform: rotate(45deg);
    transition: transform .2s ease;
    width: 9px;
}

.account-accordion[open] .account-accordion__summary::after {
    transform: rotate(-135deg);
    top: 28px;
}

.account-accordion__summary:focus-visible {
    outline: 2px solid #2bc2ee;
    outline-offset: -2px;
}

.account-accordion__body {
    border-top: 1px solid #ecedf1;
    padding: 18px 24px 22px;
}

/* ---- Tabs inside it --------------------------------------------------- */

.account-tabs {
    border-bottom: 1px solid #ecedf1;
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.account-tabs__tab {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #6e6b7b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    /* A tab is a tap target; keep it at 44px on a phone. */
    min-height: 44px;
    padding: 0 14px;
}

.account-tabs__tab.is-active {
    border-bottom-color: #2bc2ee;
    color: #2f3349;
}

.account-tabs__tab:focus-visible {
    outline: 2px solid #2bc2ee;
    outline-offset: -2px;
}

.account-tabs__panel {
    display: none;
}

.account-tabs__panel.is-active {
    display: block;
}

/*
 * Documents as a grid rather than a wrapping flex row: a label and its
 * thumbnail stay in one cell whatever the column width, so they cannot end up
 * beside or on top of each other as the row rewraps.
 */
.account-accordion .account-docs {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.account-accordion .account-docs__item {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
