/* Registration fee box (Information tab) and fee details dialog - js/conference-fees.js */

.fee-skeleton {
    display: inline-block;
    width: 110px;
    height: 0.9em;
    border-radius: 4px;
    background: linear-gradient(90deg, #eceff1 0%, #f5f7f8 50%, #eceff1 100%);
    background-size: 200% 100%;
    animation: fee-shimmer 1.2s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes fee-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* The fee box stays on one line; on very narrow screens the amount is
   shortened with an ellipsis (the full figures are in the dialog). */
#infoFeeItem .info-label {
    flex-shrink: 0;
    white-space: nowrap;
}

#infoFeeValue {
    min-width: 0;
}

.fee-summary {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 4px 8px;
    max-width: 100%;
    white-space: nowrap;
    /* The site-wide 44px touch-target rule would make this box taller than its
       neighbours; the padding / negative margin keep a large tap area instead. */
    min-height: 0;
    padding: 10px 0;
    margin: -10px 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.fee-summary__amount {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2c3e50;
    font-weight: 600;
}

.fee-summary__year {
    padding: 1px 7px;
    border-radius: 999px;
    background: #fff4e5;
    color: #9a5b00;
    font-size: 0.78em;
    font-weight: 600;
}

.fee-summary__more {
    color: #009688;
    font-size: 0.88em;
    font-weight: 600;
}

.fee-summary__more::after {
    content: " ›";
}

.fee-summary:hover .fee-summary__more,
.fee-summary:focus-visible .fee-summary__more {
    color: #00796b;
    text-decoration: underline;
}

.fee-summary:focus-visible {
    outline: 2px solid #009688;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- dialog ---------- */
body.fee-modal-open {
    overflow: hidden;
}

.fee-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.fee-modal.is-open {
    opacity: 1;
}

.fee-modal.is-closing {
    pointer-events: none;
    transition-duration: 0.22s;
}

.fee-modal__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px 30px 24px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    transform: translate3d(0, 14px, 0) scale(0.98);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    backface-visibility: hidden;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #2c3e50;
}

.fee-modal.is-open .fee-modal__panel {
    transform: none;
}

.fee-modal.is-closing .fee-modal__panel {
    transform: translate3d(0, 8px, 0) scale(0.985);
    transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1);
}

.fee-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #607d8b;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.fee-modal__close:hover,
.fee-modal__close:focus-visible {
    background: #eef6f5;
    color: #00796b;
}

.fee-modal__title {
    margin: 0 40px 2px 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.fee-modal__sub {
    margin: 0 0 18px;
    color: #607d8b;
    font-size: 0.9rem;
}

.fee-notice {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #455a64;
    font-size: 0.88rem;
    line-height: 1.45;
}

.fee-notice--warn {
    background: #fff4e5;
    color: #7a4a00;
}

.fee-modal__section {
    margin: 18px 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #607d8b;
}

.fee-table-wrap {
    overflow-x: auto;
    border: 1px solid #e3e8eb;
    border-radius: 10px;
}

.fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fee-table th,
.fee-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f3;
    text-align: right;
    vertical-align: top;
    white-space: nowrap;
}

.fee-table thead th {
    background: #f7faf9;
    color: #455a64;
    font-size: 0.8rem;
    font-weight: 600;
}

.fee-table tbody tr:last-child th,
.fee-table tbody tr:last-child td {
    border-bottom: 0;
}

.fee-table .fee-table__cat {
    text-align: left;
    white-space: normal;
    min-width: 150px;
}

.fee-table tbody .fee-table__cat {
    font-weight: 600;
}

.fee-table__price {
    display: block;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fee-table__price.is-closed {
    color: #90a4ae;
    font-weight: 500;
    text-decoration: line-through;
}

.fee-table__note {
    color: #607d8b;
    font-size: 0.8rem;
    font-weight: 500;
}

.fee-table__deadline,
.fee-table__includes {
    display: block;
    margin-top: 2px;
    color: #78909c;
    font-size: 0.75rem;
    font-weight: 500;
}

.fee-table__deadline.is-closed {
    color: #b0bec5;
}

.fee-table__none {
    color: #b0bec5;
}

.fee-modal__notes {
    margin: 16px 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.fee-modal__tax,
.fee-modal__source,
.fee-modal__disclaimer {
    margin: 10px 0 0;
    color: #607d8b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.fee-modal__source a {
    color: #009688;
    font-weight: 600;
    text-decoration: none;
}

.fee-modal__source a:hover {
    text-decoration: underline;
}

.fee-modal__disclaimer {
    padding-top: 12px;
    border-top: 1px solid #edf1f3;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .fee-modal {
        align-items: flex-end;
        padding: 0;
    }

    .fee-modal__panel {
        width: 100%;
        max-height: 88vh;
        padding: 22px 16px 20px;
        border-radius: 16px 16px 0 0;
        transform: translate3d(0, 56px, 0);
    }

    .fee-modal.is-closing .fee-modal__panel {
        transform: translate3d(0, 40px, 0);
    }

    .fee-table th,
    .fee-table td {
        padding: 9px 10px;
    }

    .fee-table .fee-table__cat {
        min-width: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fee-modal,
    .fee-modal__panel,
    .fee-skeleton {
        transition: none;
        animation: none;
    }
}
