/**
 * CCIS ticket form — review step / cart (C5).
 *
 * Theme-neutral, minimal/elegant styling for the read-only cart that replaces
 * the form section in-place before submit (no modal). Kept flow-agnostic so a
 * future membership flow can reuse it.
 *
 * All selectors are prefixed with `.gform_wrapper` (raising specificity to
 * 0,0,2,0) to win over the Gravity Forms "orbital"/foundation theme's own
 * descendant resets — mirroring what `gf_access_rights.css` does for the widget.
 * The cart panel is a child of the GF wrapper, so the prefix always matches.
 *
 * @since    0.5.0
 * @modified 0.5.0 Reworked from an overlay modal to an in-place cart panel;
 *                 prefixed selectors to beat the GF orbital theme.
 */

/* Hidden form during the cart step (in-place swap). */
.ccis-cart-hidden {
    display: none !important;
}

/* ---------- Panel ---------- */

.gform_wrapper .ccis-cart {
    margin: 0 auto;
    max-width: 640px;
    animation: ccis-cart-in 0.22s ease-out;
}

@keyframes ccis-cart-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gform_wrapper .ccis-cart__inner {
    background: #fff;
    border: 1px solid #e6e7e9;
    border-radius: 10px;
    padding: 24px 26px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ---------- Loading (simulated reload) ---------- */

.gform_wrapper .ccis-cart__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.gform_wrapper .ccis-cart__spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #e6e7e9;
    border-top-color: #2271b1;
    animation: ccis-cart-spin 0.7s linear infinite;
}

@keyframes ccis-cart-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Title ---------- */

.gform_wrapper .ccis-cart__title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d2327;
}

/* ---------- Lines ---------- */

.gform_wrapper .ccis-cart__lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gform_wrapper .ccis-cart__line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    margin: 0;
    border-top: 1px solid #eef0f2;
}

.gform_wrapper .ccis-cart__line:first-child {
    border-top: 0;
}

.gform_wrapper .ccis-cart__line-main {
    flex: 1 1 auto;
    min-width: 0;
}

.gform_wrapper .ccis-cart__line-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
}

.gform_wrapper .ccis-cart__line-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.gform_wrapper .ccis-cart__line-qty {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
}

.gform_wrapper .ccis-cart__line-unit {
    font-size: 13px;
    color: #8c8f94;
    white-space: nowrap;
}

.gform_wrapper .ccis-cart__line-total {
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
    text-align: right;
}

/* ---------- Participants ---------- */

.gform_wrapper .ccis-cart__people {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gform_wrapper .ccis-cart__person {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    font-size: 13px;
    color: #50575e;
}

.gform_wrapper .ccis-cart__person-name {
    font-weight: 500;
}

.gform_wrapper .ccis-cart__person-email {
    color: #8c8f94;
    word-break: break-word;
}

.gform_wrapper .ccis-cart__free {
    color: #007017;
    font-weight: 600;
}

/* ---------- Totals ---------- */

.gform_wrapper .ccis-cart__totals {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 2px solid #1d2327;
}

.gform_wrapper .ccis-cart__totals-label {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #50575e;
}

.gform_wrapper .ccis-cart__totals-value {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
}

/* ---------- Buyer data (secondary) ---------- */

.gform_wrapper .ccis-cart__buyer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef0f2;
}

.gform_wrapper .ccis-cart__subtitle {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8c8f94;
}

.gform_wrapper .ccis-cart__fields {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(110px, 34%) 1fr;
    gap: 6px 16px;
    font-size: 13px;
}

.gform_wrapper .ccis-cart__fields dt {
    color: #8c8f94;
    font-weight: 400;
}

.gform_wrapper .ccis-cart__fields dd {
    margin: 0;
    color: #3c434a;
    word-break: break-word;
}

/* ---------- Actions ---------- */

.gform_wrapper .ccis-cart__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
}

.gform_wrapper .ccis-cart__edit,
.gform_wrapper .ccis-cart__checkout {
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gform_wrapper .ccis-cart__edit {
    background: transparent;
    border-color: transparent;
    color: #50575e;
    padding-left: 4px;
    padding-right: 4px;
}

.gform_wrapper .ccis-cart__edit:hover {
    color: #1d2327;
    text-decoration: underline;
}

.gform_wrapper .ccis-cart__checkout {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 1px 2px rgba(34, 113, 177, 0.35);
}

.gform_wrapper .ccis-cart__checkout:hover {
    background: #185a8d;
}

@media (max-width: 480px) {
    .gform_wrapper .ccis-cart__inner {
        padding: 18px 16px;
    }
    .gform_wrapper .ccis-cart__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .gform_wrapper .ccis-cart__checkout,
    .gform_wrapper .ccis-cart__edit {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gform_wrapper .ccis-cart,
    .gform_wrapper .ccis-cart__spinner {
        animation: none;
    }
}
