/* ── Ticket Sales – Public Styles ── */

.ts-checkout {
    max-width: 720px;
    margin: 0 auto;
    font-family: inherit;
}

/* Sections */
.ts-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 20px;
}
.ts-section h3 {
    margin: 0 0 18px;
    font-size: 1.1rem;
    color: #111827;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

/* Ticket type cards */
.ts-ticket-types {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.ts-type-card {
    flex: 1;
    min-width: 160px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color .2s, box-shadow .2s;
}
.ts-type-card input[type="radio"] {
    display: none;
}
.ts-type-card:hover,
.ts-type-card.is-selected {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.ts-type-name {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
}
.ts-type-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4f46e5;
}
.ts-type-price small {
    font-size: .75rem;
    font-weight: 400;
    color: #6b7280;
}

/* Fields */
.ts-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ts-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ts-field--full,
.ts-field--count {
    grid-column: 1 / -1;
}
.ts-field--count input { max-width: 90px; }
.ts-field label {
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
}
.ts-field label .req { color: #ef4444; }
.ts-field input,
.ts-field textarea,
.ts-field select {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}
.ts-field input:focus,
.ts-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* Attendees */
#ts-attendees { display: flex; flex-direction: column; gap: 10px; }

/* Discount */
.ts-discount-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.ts-discount-row input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .9rem;
}
.ts-discount-msg {
    margin-top: 8px;
    font-size: .875rem;
    padding: 8px 12px;
    border-radius: 6px;
}
.ts-discount-msg.is-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.ts-discount-msg.is-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* Price summary */
.ts-price-summary {
    background: #f9fafb;
}
.ts-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .9rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}
.ts-price-row--total {
    padding-top: 12px;
    border-bottom: none;
    font-size: 1.1rem;
    color: #111827;
}

/* Buttons */
.ts-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 7px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity .2s, transform .1s;
}
.ts-btn:active { transform: scale(.98); }
.ts-btn--primary {
    background: #4f46e5;
    color: #fff;
}
.ts-btn--primary:hover { background: #4338ca; }
.ts-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.ts-btn--secondary:hover { background: #e5e7eb; }
.ts-btn:disabled { opacity: .5; cursor: not-allowed; }

.ts-submit-row { text-align: center; margin-top: 10px; }
.ts-submit-row .ts-btn { padding: 14px 40px; font-size: 1rem; width: 100%; max-width: 340px; }

/* Notices */
.ts-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: .9rem;
}
.ts-notice--error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.ts-notice--warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ts-notice--success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Thank-you page */
.ts-thankyou { max-width: 640px; margin: 0 auto; text-align: center; }
.ts-thankyou__icon {
    width: 64px; height: 64px;
    background: #4f46e5; color: #fff;
    border-radius: 50%; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.ts-order-summary { text-align: left; margin-top: 30px; }
.ts-order-summary table { width: 100%; border-collapse: collapse; }
.ts-order-summary th, .ts-order-summary td { padding: 9px 12px; border-bottom: 1px solid #e5e7eb; font-size: .9rem; }
.ts-order-summary th { color: #6b7280; font-weight: 500; width: 45%; }

/* Failed page */
.ts-failed { max-width: 560px; margin: 0 auto; text-align: center; }
.ts-failed__icon {
    width: 64px; height: 64px;
    background: #ef4444; color: #fff;
    border-radius: 50%; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}

/* Help text */
.ts-help { font-size: .85rem; color: #6b7280; margin-bottom: 14px; }

/* Responsive */
@media (max-width: 600px) {
    .ts-section { padding: 20px 16px; }
    .ts-fields-grid { grid-template-columns: 1fr; }
    .ts-ticket-types { flex-direction: column; }
}

/* ── Attendee blocks ── */
.ts-attendee-block {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 14px;
}
.ts-attendee-block:last-child { margin-bottom: 0; }
.ts-attendee-label {
    margin: 0 0 12px;
    font-size: .875rem;
    color: #374151;
}

/* ── Field validation errors ── */
.ts-input--error,
.ts-input--error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}
.ts-input--error::placeholder {
    color: #f87171;
}
.ts-field-error {
    display: block;
    margin-top: 4px;
    font-size: .8rem;
    color: #ef4444;
    font-weight: 500;
}
