/* ==========================================================================
   WSH Alohana — Component Styles
   DO NOT hardcode colors, fonts, or section padding in this file.
   All design values come from wsh-design-tokens.css as CSS custom properties.
   To update the plugin's visual style, edit wsh-design-tokens.css — not this file.
   ========================================================================== */

/* wsh-my-reservations.css — layout-only additions for [wsh_my_reservations].
   All colors, typography, buttons, badges, itinerary-card styling come from
   wsh-alohana-demo.css. No new visual identity here. */

.wsh-myres-wrap { max-width: 960px; margin: 0 auto; }

.wsh-myres-login {
    max-width: 480px;
    margin: 0 auto;
}

.wsh-myres-form .wsh-field { margin-bottom: 16px; }
.wsh-myres-form .wsh-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}
.wsh-myres-form .wsh-field input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.wsh-myres-divider {
    margin: 28px 0 20px;
    text-align: center;
    border-top: 1px solid #eee;
    line-height: 0;
}
.wsh-myres-divider span {
    background: var(--wsh-color-white);
    padding: 0 12px;
    color: #888;
    font-size: 13px;
}

.wsh-myres-helper {
    color: #666; /* TODO: review — close but not exact palette match */
    font-size: 14px;
    margin: 4px 0 16px;
}

.wsh-myres-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.wsh-myres-greeting { margin: 4px 0 0; }
.wsh-myres-signout { font-size: 14px; }

.wsh-myres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.wsh-myres-form--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.wsh-myres-form--inline .wsh-field {
    flex: 1 1 240px;
    margin-bottom: 0;
}

.wsh-myres-result { margin-top: 20px; }

.wsh-myres-back {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
}

.wsh-myres-subhead { margin-top: 28px; }

.wsh-myres-loading { color: #666; /* TODO: review — close but not exact palette match */ font-style: italic; }

/* ==========================================================================
   Patch 2.7 — reservation cards as <details> with inline detail panel
   ========================================================================== */

.wsh-myres-card { padding: 0; overflow: hidden; }

.wsh-myres-card__details { width: 100%; }

/* Reset native <summary> defaults across browsers, restore pointer cursor. */
.wsh-myres-card__summary {
    list-style: none;
    cursor: pointer;
    padding: 16px;
    display: block;
}
.wsh-myres-card__summary::-webkit-details-marker { display: none; }
.wsh-myres-card__summary::marker { content: ''; }

.wsh-myres-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.wsh-myres-card__resid { margin: 0; font-size: 17px; }

.wsh-myres-card__bucket {
    flex-shrink: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--wsh-color-sky);
    color: var(--wsh-color-dark);
}
.wsh-myres-card--active .wsh-myres-card__bucket {
    background: var(--wsh-color-green);
    color: var(--wsh-color-white);
}
.wsh-myres-card--past .wsh-myres-card__bucket {
    background: #eee;
    color: var(--wsh-color-grey);
}

.wsh-myres-card__unit {
    margin: 4px 0 8px;
    font-weight: 500;
    color: var(--wsh-color-dark);
}

.wsh-myres-card__dates {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0;
}
.wsh-myres-card__date dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wsh-color-grey);
}
.wsh-myres-card__date dd { margin: 2px 0 0; font-weight: 500; }

.wsh-myres-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 8px;
}
.wsh-myres-card__status {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wsh-color-green);
}
.wsh-myres-card__total { text-align: right; }
.wsh-myres-card__total-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--wsh-color-grey);
}
.wsh-myres-card__total-value {
    font-weight: 600;
    color: var(--wsh-color-dark);
}

.wsh-myres-card__expander {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--wsh-color-green);
    font-weight: 500;
}
.wsh-myres-card__expander::before { content: '▾ '; }
.wsh-myres-card__expander-hide { display: none; }
[open] .wsh-myres-card__expander::before { content: '▴ '; }
[open] .wsh-myres-card__expander-show { display: none; }
[open] .wsh-myres-card__expander-hide { display: inline; }

/* Detail panel ----------------------------------------------------- */

.wsh-myres-card__detail-panel {
    border-top: 1px solid #eee;
    padding: 16px;
    background: rgba(var(--wsh-color-green-rgb), 0.04);
}
.wsh-myres-card__headline {
    margin: 0 0 12px;
    color: var(--wsh-color-grey);
    font-style: italic;
}

.wsh-myres-detail-section { margin-bottom: 16px; }
.wsh-myres-detail-section:last-child { margin-bottom: 0; }
.wsh-myres-detail-heading {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wsh-color-grey);
}

.wsh-myres-detail-list {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.wsh-myres-detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.wsh-myres-detail-list dt {
    font-weight: 500;
    color: var(--wsh-color-dark);
}
.wsh-myres-detail-list dd { margin: 0; text-align: right; }

.wsh-myres-detail-list--money dd { font-variant-numeric: tabular-nums; }
.wsh-myres-detail-list__total {
    border-top: 1px solid #ddd;
    padding-top: 6px;
    margin-top: 6px;
    font-weight: 600;
}
.wsh-myres-detail-list__total dt,
.wsh-myres-detail-list__total dd { font-weight: 600; }

.wsh-myres-detail-suffix {
    color: var(--wsh-color-grey);
    font-weight: 400;
}

.wsh-myres-detail-text {
    margin: 0;
    color: var(--wsh-color-dark);
    line-height: 1.5;
}

.wsh-myres-detail-footer {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--wsh-color-grey);
    text-align: right;
}

/* Past cards de-emphasized so the eye lands on active/upcoming first. */
.wsh-myres-card--past { opacity: 0.85; }
.wsh-myres-card--past .wsh-myres-card__resid { color: var(--wsh-color-grey); }

/* No-eligible-reservations + contact-info styling --------------------------- */

.wsh-myres-no-eligible .wsh-myres-contact { margin: 12px 0; }
.wsh-myres-contact__sep { color: var(--wsh-color-grey); }
