/* Bookings, for players and pros. */

.bi-booking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-booking {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0 12px 12px;
    border-bottom: 1px solid var(--bi-border);
    border-left: 3px solid #c3ccd5;
}

.bi-booking:last-child {
    border-bottom: 0;
}

.bi-booking.is-requested {
    border-left-color: #b7791f;
}

.bi-booking.is-confirmed {
    border-left-color: #1d7a4c;
}

.bi-booking.is-closed {
    opacity: 0.7;
}

.bi-booking-main {
    min-width: 0;
}

.bi-booking-status {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef1f4;
    color: #3d4a57;
    font-size: 0.75rem;
}

.is-requested .bi-booking-status {
    background: #fdf3e1;
    color: #8a5a12;
}

.is-confirmed .bi-booking-status {
    background: #e5f4ec;
    color: #1d6b43;
}

.bi-booking-message {
    margin-top: 4px;
    color: #3d4a57;
    font-style: italic;
    overflow-wrap: anywhere;
}

.bi-booking-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bi-booking-actions form {
    margin: 0;
}

.bi-booking-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 16px 0 0;
}

.bi-booking-facts dt {
    color: #5b6773;
    font-weight: 500;
}

.bi-booking-facts dd {
    margin: 0;
}

/* payment state of a confirmed booking */
.bi-payment-pill {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef1f4;
    color: #3d4a57;
    font-size: 0.75rem;
    white-space: nowrap;
}

.bi-payment-pill.is-unpaid { background: #fbeceb; color: #9b2c24; }
.bi-payment-pill.is-payment-sent { background: #fdf3e1; color: #8a5a12; }
.bi-payment-pill.is-partly-paid { background: #fdf3e1; color: #8a5a12; }
.bi-payment-pill.is-paid { background: #e5f4ec; color: #1d6b43; }
.bi-payment-pill.is-refunded { background: #eef1f4; color: #5b6773; }

.bi-payment-list {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.bi-payment-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid var(--bi-border);
}

.bi-payment-list li.is-rejected,
.bi-payment-list li.is-refunded {
    opacity: 0.65;
}

/* a payment the player says they sent, waiting on the pro */
.bi-payment-pill.is-nudge {
    box-shadow: 0 0 0 2px #f0b74a;
}

.bi-payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bi-payment-actions form {
    margin: 0;
}

.bi-claimed-list {
    margin-top: 8px;
}

.bi-paid-form > summary {
    list-style: none;
}

.bi-paid-form > summary::-webkit-details-marker {
    display: none;
}

/* ways to pay the pro */
.bi-pay-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-pay {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bi-border, #dfe3e8);
    border-radius: 10px;
}

.bi-pay-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    overflow-wrap: anywhere;
}

.bi-pay-qr {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
}

.bi-pay-qr svg {
    width: 100%;
    height: 100%;
}

img.bi-pay-qr {
    object-fit: contain;
}

/* what is owed */
.bi-owed-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-owed-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 6px 0;
    border-bottom: 1px solid #eef1f4;
}

.bi-owed-list li:last-child {
    border-bottom: 0;
}

.bi-owed-amount {
    margin-left: auto;
    font-weight: 600;
    white-space: nowrap;
}

.bi-owed-line {
    padding: 8px 12px;
    border-radius: 8px;
    background: #fdf3e1;
    color: #6b4a10;
}

/* paying by card or bank through Stripe */
.bi-pay-card {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 8px;
}

.bi-pay-card form {
    margin: 0;
}

.bi-pay-or {
    margin: 16px 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* the booking popup */
.bi-bp-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bi-bp-swatch {
    flex: 0 0 12px;
    height: 40px;
    border-radius: 4px;
}

.bi-bp-head > div {
    flex: 1;
    min-width: 0;
}

.bi-bp-when {
    font-weight: 600;
}

.bi-bp-status {
    white-space: nowrap;
}

.bi-bp-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef1f4;
}

.bi-bp-label {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: default;
}

summary.bi-bp-label {
    cursor: pointer;
}

.bi-bp-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bi-bp-row form {
    margin: 0;
}

.bi-bp-amount {
    width: 140px;
}

.bi-bp-method {
    width: auto;
}

.bi-bp-reason {
    flex: 1;
    min-width: 160px;
}

/* not paid / paid / refunded: one of them is on */
.bi-bp-switch {
    display: inline-flex;
    border: 1px solid #cfd6de;
    border-radius: 8px;
    overflow: visible;
}

.bi-bp-switch form,
.bi-bp-switch .dropdown {
    margin: 0;
}

.bi-bp-switch button:not(.dropdown-item) {
    padding: 6px 14px;
    border: 0;
    border-right: 1px solid #cfd6de;
    background: #fff;
    color: #3d4a57;
    font-size: 0.9rem;
}

.bi-bp-switch > :first-child button {
    border-radius: 8px 0 0 8px;
}

.bi-bp-switch > :last-child button {
    border-right: 0;
    border-radius: 0 8px 8px 0;
}

.bi-bp-switch button:not(.dropdown-item):not(:disabled):hover {
    background: #f3f6f9;
}

.bi-bp-switch button:disabled:not(.is-on) {
    color: #aab4be;
}

.bi-bp-switch button.is-on {
    background: #0a315f;
    color: #fff;
    opacity: 1;
}

.bi-bp-note {
    margin: 8px 0 0;
    color: #5b6773;
    font-size: 0.9rem;
}

.bi-bp-claim {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fdf3e1;
}

.bi-bp-more {
    margin-top: 10px;
    font-size: 0.9rem;
}

.bi-bp-more > summary {
    color: #0a58ca;
    cursor: pointer;
}

.bi-bp-more > summary.bi-bp-label {
    color: inherit;
}

.bi-bp-history {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #5b6773;
}

.bi-bp-history .is-rejected,
.bi-bp-history .is-refunded,
.bi-bp-history .is-voided {
    text-decoration: line-through;
}

.bi-bp-foot {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid #eef1f4;
}

.bi-bp-ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* the list view's payment pill sits after the title */
.fc-list-event-title .bi-payment-pill {
    margin-left: 8px;
}

.bi-bp-cancelled {
    padding: 12px 14px;
    border: 1px dashed #cfd6de;
    border-top: 1px dashed #cfd6de;
    border-radius: 8px;
    background: #f8f9fa;
}

/* a price and its currency, side by side */
.bi-currency-select {
    flex: 0 0 auto;
    width: auto;
    max-width: 90px;
}

.bi-bp-price {
    width: 190px;
}

.bi-bp-remind {
    margin-top: 10px;
}

.bi-bp-remind form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* accepting a request whose price is to be agreed: the price beside Accept */
.bi-accept-priced {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bi-accept-priced .form-control {
    width: 90px;
}

/* ---- the booking popup's quick way: a regular's face, then a game or tournament ---- */

.bi-quick {
    margin-bottom: 6px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bi-border);
}

.bi-quick-who {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
}

.bi-quick-person {
    display: flex;
    flex: 0 0 64px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bi-ink);
    scroll-snap-align: start;
}

.bi-quick-person img,
.bi-quick-person > span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: var(--bi-navy);
    color: #fff;
    font-weight: 700;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--bi-border);
}

.bi-quick-person.is-other > span {
    background: #eef4fb;
    color: var(--bi-blue);
}

.bi-quick-person small {
    max-width: 64px;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bi-quick-person:hover img,
.bi-quick-person:hover > span,
.bi-quick-person.is-picked img,
.bi-quick-person.is-picked > span {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bi-blue);
}

.bi-quick-person.is-picked small {
    font-weight: 700;
}

.bi-quick-modes {
    display: inline-flex;
    margin: 8px 0 4px;
    padding: 3px;
    border-radius: 999px;
    background: #eef2f7;
}

.bi-quick-modes button {
    padding: 5px 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--bi-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.bi-quick-modes button.is-on {
    background: #fff;
    color: var(--bi-ink);
    box-shadow: 0 1px 3px rgba(20, 57, 105, 0.15);
}

.bi-quick-title {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    margin: 12px 0 6px;
    font-weight: 700;
}

.bi-quick-title small {
    color: var(--bi-muted);
    font-weight: 400;
}

.bi-quick-search {
    max-width: 260px;
    margin-left: auto;
}

/* a row of tiles that slides sideways: a finger on a tablet, a wheel or the bar on a computer */
.bi-quick-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.bi-quick-tile {
    display: flex;
    flex: 0 0 168px;
    flex-direction: column;
    gap: 1px;
    padding: 9px 12px;
    border: 1px solid var(--bi-border);
    border-top: 3px solid var(--bi-blue);
    border-radius: 10px;
    background: #fff;
    color: var(--bi-ink);
    text-align: left;
    scroll-snap-align: start;
}

.bi-quick-tile.is-tournament {
    flex-basis: 210px;
    border-top-color: #c24fb0;
}

.bi-quick-tile:hover {
    box-shadow: var(--bi-shadow);
}

.bi-quick-tile.is-picked {
    border-color: var(--bi-blue);
    background: #f2f8ff;
    box-shadow: 0 0 0 2px var(--bi-blue);
}

.bi-quick-day {
    font-weight: 700;
}

.bi-quick-when {
    color: var(--bi-blue);
    font-size: 0.85rem;
    font-weight: 600;
}

.bi-quick-tile.is-tournament .bi-quick-when {
    color: #a3338f;
}

.bi-quick-name {
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bi-quick-detail {
    overflow: hidden;
    color: var(--bi-muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bi-quick-empty {
    margin: 0;
    color: var(--bi-muted);
    font-size: 0.88rem;
}

.bi-quick-missing {
    margin: 4px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fdf6e3;
    color: #6b4e0e;
    font-size: 0.88rem;
}

/* a tile that cannot be asked for: the pro is busy then, or does not offer it */
.bi-quick-tile:disabled {
    border-top-color: #d6dbe1;
    background: #f6f7f9;
    opacity: 1;
    cursor: default;
}

.bi-quick-tile:disabled .bi-quick-day,
.bi-quick-tile:disabled .bi-quick-when,
.bi-quick-tile:disabled .bi-quick-name {
    color: #8b95a1;
}

/* a player's popup: any pro by name, and who is being asked */
.bi-ask-find {
    margin: 4px 0 10px;
}

.bi-ask-found {
    display: flex;
    flex-direction: column;
    margin: 6px 0;
    color: var(--bi-muted);
}

.bi-ask-found button {
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--bi-ink);
    font-weight: 600;
    text-align: left;
}

.bi-ask-found button:hover {
    background: #f2f8ff;
}

.bi-ask-found small {
    color: var(--bi-muted);
    font-weight: 400;
}

.bi-ask-who-line {
    margin: 8px 0 0;
}
