/* ===== ADMIN: TICKET MANAGEMENT ===== */

.rt7-tickets-admin-section .description {
    color: #a0aec0;
    font-style: italic;
}

.rt7-tickets-list { margin-bottom: 16px; }

.rt7-ticket-row {
    border: 1px solid #e1e1e7;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    overflow: hidden;
    transition: box-shadow 150ms, border-color 150ms;
}

.rt7-ticket-row:hover {
    border-color: #c5b8ff;
    box-shadow: 0 2px 6px rgba(108,71,255,.1), 0 4px 14px rgba(0,0,0,.06);
}

/* Numbered accent bar on the left */
.rt7-ticket-row::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #6c47ff 0%, #a78bfa 100%);
}

.rt7-ticket-row__inner { padding: 16px 18px; }

.rt7-ticket-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px 18px;
}

.rt7-ticket-field--description { grid-column: 1 / -1; }
.rt7-ticket-field--sale-start,
.rt7-ticket-field--sale-end    { grid-column: auto; }

/* Type select */
.rt7-ticket-field--type select {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #e1e1e7;
    border-radius: 5px;
    background: #fafafa;
    color: #1d2327;
    transition: border-color 150ms, box-shadow 150ms;
    cursor: pointer;
}

.rt7-ticket-field--type select:focus {
    border-color: #6c47ff;
    box-shadow: 0 0 0 2px rgba(108,71,255,.13);
    outline: none;
}

/* Virtual section */
.rt7-ticket-virtual-section {
    margin: 0 18px 14px;
    padding: 14px 16px;
    background: #f5f3ff;
    border: 1px dashed #c5b8ff;
    border-radius: 6px;
}

.rt7-ticket-virtual-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px 18px;
}

.rt7-ticket-virtual-inner select,
.rt7-ticket-virtual-inner input[type="url"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #c5b8ff;
    border-radius: 5px;
    background: #fff;
    color: #1d2327;
    box-sizing: border-box;
    transition: border-color 150ms, box-shadow 150ms;
}

.rt7-ticket-virtual-inner select:focus,
.rt7-ticket-virtual-inner input[type="url"]:focus {
    border-color: #6c47ff;
    box-shadow: 0 0 0 2px rgba(108,71,255,.13);
    outline: none;
}

/* Field labels inside ticket rows */
.rt7-ticket-grid .rt7-event-field label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6c7a8a;
    margin-bottom: 5px;
}

/* Inputs inside ticket rows */
.rt7-ticket-grid .rt7-event-field input[type="text"],
.rt7-ticket-grid .rt7-event-field input[type="number"],
.rt7-ticket-grid .rt7-event-field input[type="date"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #e1e1e7;
    border-radius: 5px;
    box-sizing: border-box;
    background: #fafafa;
    color: #1d2327;
    transition: border-color 150ms, box-shadow 150ms, background 150ms;
}

.rt7-ticket-grid .rt7-event-field input:focus {
    border-color: #6c47ff;
    box-shadow: 0 0 0 2px rgba(108,71,255,.13);
    outline: none;
    background: #fff;
}

.rt7-ticket-row__remove {
    padding: 8px 18px 10px;
    border-top: 1px solid #f0f0f3;
    text-align: right;
    background: #fafafa;
}

.rt7-ticket-row__remove .rt7-remove-ticket {
    color: #e53e3e;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: color 150ms;
}

.rt7-ticket-row__remove .rt7-remove-ticket:hover {
    color: #c53030;
    text-decoration: underline;
}

.rt7-capacity-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rt7-capacity-input { width: 80px; }

.rt7-unlimited-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rt7-unlimited-label input[type="checkbox"] {
    accent-color: #6c47ff;
    cursor: pointer;
}

.rt7-price-input { width: 100px; }

/* "Add Ticket Type" button */
.rt7-add-ticket-btn.button {
    background: #f0edff !important;
    color: #6c47ff !important;
    border: 1.5px solid #6c47ff !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 16px !important;
    box-shadow: none !important;
    transition: background 150ms, color 150ms !important;
    margin-top: 6px;
}

.rt7-add-ticket-btn.button:hover {
    background: #6c47ff !important;
    color: #fff !important;
}

@media screen and (max-width: 1100px) {
    .rt7-ticket-grid { grid-template-columns: 2fr 1fr 1fr; }
    .rt7-ticket-field--type { grid-column: 1 / -1; }
}

@media screen and (max-width: 960px) {
    .rt7-ticket-grid { grid-template-columns: 1fr 1fr; }
    .rt7-ticket-field--name,
    .rt7-ticket-field--type { grid-column: 1 / -1; }
    .rt7-ticket-virtual-inner { grid-template-columns: 1fr; }
}

@media screen and (max-width: 600px) {
    .rt7-ticket-grid { grid-template-columns: 1fr; }
    .rt7-ticket-field--description,
    .rt7-ticket-field--sale-start,
    .rt7-ticket-field--sale-end { grid-column: 1; }
}

/* ===== TICKETS ===== */

.rt7-tickets {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--rt7-events-bg, #f9fafb);
    border: 1px solid var(--rt7-events-border, #e5e7eb);
    border-radius: var(--rt7-events-radius, 8px);
}

.rt7-tickets__heading {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rt7-events-text-light, #6b7280);
}

.rt7-tickets__error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: .6rem .875rem;
    border-radius: 4px;
    font-size: .875rem;
    margin-bottom: .875rem;
}

.rt7-tickets__confirmation {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 8px;
    text-align: center;
}

.rt7-tickets__confirmation-emoji {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: .5rem;
}

.rt7-tickets__confirmation-heading {
    font-size: 1.4rem;
    font-weight: 800;
    color: #14532d;
    margin: 0 0 .35rem;
}

.rt7-tickets__confirmation-event {
    font-size: 1rem;
    font-weight: 700;
    color: #15803d;
    margin: 0 0 .25rem;
}

.rt7-tickets__confirmation-detail {
    font-size: .875rem;
    color: #166534;
    margin: 0 0 .875rem;
}

.rt7-tickets__confirmation-email {
    font-size: .875rem;
    color: #15803d;
    margin: 0 0 .75rem;
}

.rt7-tickets__confirmation-ref {
    font-size: .75rem;
    color: #4ade80;
    margin: 0;
    letter-spacing: .03em;
}

.rt7-tickets__event-sold-out {
    background: #fff3f3;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: .875rem 1.125rem;
    color: #b91c1c;
    font-size: .95rem;
    font-weight: 500;
}
.rt7-tickets__event-sold-out p {
    margin: 0;
}

.rt7-ticket-type {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--rt7-events-border, #e5e7eb);
}

.rt7-ticket-type:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.rt7-ticket-type--sold-out { opacity: .55; }
.rt7-ticket-type__info { flex: 1; }

.rt7-ticket-type__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rt7-events-text, #374151);
    margin: 0 0 .2rem;
}

.rt7-ticket-type__description {
    color: var(--rt7-events-text-light, #6b7280);
    font-size: .85rem;
    margin: 0 0 .4rem;
}

.rt7-ticket-type__price {
    font-weight: 800;
    font-size: 1.1rem;
    color: #E3140E;
}

.rt7-ticket-type__low-stock {
    font-size: .78rem;
    color: #dc2626;
    margin-left: .6rem;
    font-weight: 600;
}

.rt7-ticket-type__sold-out,
.rt7-ticket-type__not-on-sale {
    font-size: .8rem;
    font-weight: 600;
    color: var(--rt7-events-text-light, #6b7280);
    align-self: center;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rt7-ticket-form { min-width: 240px; }

.rt7-ticket-form__fields {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .625rem;
}

.rt7-ticket-form__field label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--rt7-events-text-light, #6b7280);
    margin-bottom: .2rem;
}

.rt7-ticket-form__field input {
    width: 100%;
    padding: .45rem .65rem;
    border: 1px solid var(--rt7-events-border, #e5e7eb);
    border-radius: 5px;
    font-size: .9rem;
    color: var(--rt7-events-text, #374151);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 150ms, box-shadow 150ms;
}

.rt7-ticket-form__field input:focus {
    outline: none;
    border-color: #E3140E;
    box-shadow: 0 0 0 2px rgba(227,20,14,.1);
}

.rt7-ticket-form__field--qty input { width: 72px; }

.rt7-ticket-form__submit {
    background: #E3140E;
    color: #fff;
    border: none;
    padding: .6rem 1.1rem;
    border-radius: 5px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 150ms;
}

.rt7-ticket-form__submit:hover  { background: #c41009; }
.rt7-ticket-form__submit:active { opacity: .9; }

@media (max-width: 600px) {
    .rt7-ticket-type { flex-direction: column; gap: .875rem; }
    .rt7-ticket-form { width: 100%; min-width: unset; }
}

/* ===== CHECKOUT PAGE ===== */

.rt7-checkout-wrap {
    margin: 0 -20px; /* bleed past theme padding */
}

.rt7-checkout__event-header {
    margin-bottom: 0;
}

.rt7-checkout__event-meta {
    margin: .4rem 0 0;
    font-size: .9rem;
    color: rgba(255,255,255,.8);
    font-weight: 500;
}

.rt7-checkout-body {
    display: flex;
    justify-content: center;
    padding: 2.5rem 1.25rem 3rem;
    background: #f5f5f5;
    min-height: 320px;
}

.rt7-checkout-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
    padding: 2rem 2rem 2.25rem;
    width: 100%;
    max-width: 520px;
}

.rt7-checkout__back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1.25rem;
}

.rt7-checkout__back:hover { color: #E3140E; }
.rt7-checkout__back svg { flex-shrink: 0; }

.rt7-checkout-card__heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: #141827;
    margin: 0 0 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.rt7-checkout-summary {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.rt7-checkout-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    color: #4b5563;
}

.rt7-checkout-summary__row--total {
    border-top: 1px solid #e5e7eb;
    padding-top: .625rem;
    margin-top: .25rem;
    font-weight: 700;
}

.rt7-checkout-summary__total {
    font-size: 1.1rem;
    font-weight: 800;
    color: #E3140E;
}

/* Square card container inside checkout card */
.rt7-square-form {
    margin-top: .25rem;
}

.rt7-square-form__field label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: .4rem;
}

.rt7-square-card-container {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: .5rem .75rem;
    background: #fff;
    min-height: 48px;
    margin-bottom: .75rem;
    transition: border-color 150ms;
}

.rt7-square-card-container:focus-within {
    border-color: #E3140E;
    box-shadow: 0 0 0 2px rgba(227,20,14,.1);
}

.rt7-checkout__pay-btn {
    display: block;
    width: 100%;
    padding: .8rem 1rem;
    background: #E3140E;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    margin-top: .875rem;
    transition: background 150ms;
}

.rt7-checkout__pay-btn:hover  { background: #c41009; }
.rt7-checkout__pay-btn:active { opacity: .9; }
.rt7-checkout__pay-btn:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 600px) {
    .rt7-checkout-wrap { margin: 0 -15px; }
    .rt7-checkout-card { padding: 1.5rem 1.25rem; }
    .rt7-checkout-body { padding: 1.5rem .75rem 2rem; }
}
