/* TeleSleep Square Checkout styles */

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

.tsq-step {
    margin-bottom: 28px;
}

.tsq-step-title {
    font-size: 1.15rem;
    margin: 0 0 14px;
    color: #0b2a4a;
}

/* Product selector cards */
.tsq-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.tsq-product {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tsq-product:hover {
    border-color: #0da5b4;
}

.tsq-product-selected {
    border-color: #0da5b4;
    box-shadow: 0 0 0 1px #0da5b4;
    background: #f0fbfc;
}

.tsq-product input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tsq-product-name {
    font-weight: 600;
    color: #0b2a4a;
    font-size: 0.95rem;
}

.tsq-product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0da5b4;
}

.tsq-regular-price {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
    margin-right: 0.4rem;
}

.tsq-sale-price {
    color: #0f766e;
}

.tsq-product-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
}

.tsq-product-disabled .tsq-product-price {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Card form */
.tsq-secure-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 10px;
}

/* Patient details (home sleep study) */
.tsq-details-step[hidden],
#tsq-details-step[hidden] {
    display: none;
}

.tsq-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tsq-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .tsq-field-row {
        grid-template-columns: 1fr;
    }
}

.tsq-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0b2a4a;
    margin-bottom: 6px;
}

.tsq-field input,
.tsq-field select {
    width: 100%;
    padding: 11px 12px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #0b2a4a;
    box-sizing: border-box;
}

.tsq-field input:focus,
.tsq-field select:focus {
    outline: none;
    border-color: #0da5b4;
    box-shadow: 0 0 0 1px #0da5b4;
}

.tsq-portal-note {
    margin-top: 18px;
    font-size: 0.9rem;
    color: #64748b;
}

.tsq-portal-note[hidden] {
    display: none;
}

.tsq-portal-note a {
    color: #0da5b4;
    font-weight: 600;
}

.tsq-card-container {
    min-height: 120px;
    padding: 6px 2px;
}

/* Pay button */
.tsq-pay-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 34px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: #0da5b4;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.tsq-pay-button:hover:not(:disabled) {
    background: #0b8a97;
}

.tsq-pay-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tsq-pay-amount {
    font-weight: 700;
}

/* Messages */
.tsq-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.tsq-message[hidden] {
    display: none;
}

.tsq-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.tsq-message-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Notices (e.g. not configured) */
.tsq-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.tsq-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Success state */
.tsq-success {
    text-align: center;
    padding: 32px 24px;
    border: 2px solid #bbf7d0;
    background: #f0fdf4;
    border-radius: 12px;
}

.tsq-success[hidden] {
    display: none;
}

.tsq-success h3 {
    color: #15803d;
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.tsq-success p {
    color: #334155;
    margin: 0 0 20px;
}

.tsq-receipt-line {
    font-size: 0.95rem;
}

.tsq-receipt-line[hidden] {
    display: none;
}

.tsq-booking-button {
    display: inline-block;
    padding: 14px 34px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff !important;
    background: #0b2a4a;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.tsq-booking-button:hover {
    background: #123c66;
}

.tsq-booking-button[hidden] {
    display: none;
}

/* State eligibility check (non-study services; studies collect state in the details step) */
.tsq-state-check {
    background: #f0f7ff;
    border: 1px solid #bcd7f5;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 16px;
}
.tsq-state-check[hidden] {
    display: none;
}
.tsq-state-note {
    font-size: 14px;
    color: #1F2A5C;
    margin: 0 0 10px;
    line-height: 1.5;
}
.tsq-state-check .tsq-field {
    margin: 0;
}
.tsq-state-check select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}

/* Custom amount (deductible / balance payment) */
.tsq-custom-amount {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    padding: 14px 16px;
}
.tsq-custom-amount[hidden] {
    display: none;
}
.tsq-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
}
.tsq-currency {
    font-size: 18px;
    font-weight: 600;
    color: #1F2A5C;
}
.tsq-amount-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
}
.tsq-custom-price-label {
    font-size: 13px;
    color: #475569;
    font-style: italic;
}

/* Promo code */
.tsq-promo {
    margin: 4px 0 12px;
}
.tsq-promo-toggle {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #3D57A3 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.tsq-promo-toggle:hover {
    background: none !important;
    background-color: transparent !important;
    color: #1F8FC7 !important;
}
.tsq-promo-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.tsq-promo-form[hidden] {
    display: none;
}
.tsq-promo-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    text-transform: uppercase;
}
.tsq-promo-apply {
    padding: 10px 18px;
    border: 1px solid #0da5b4;
    border-radius: 8px;
    background: #fff;
    color: #0da5b4;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.tsq-promo-apply:hover {
    background: #ecfeff;
}
.tsq-promo-message {
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}
.tsq-promo-ok {
    color: #15803d;
}
.tsq-promo-error {
    color: #b91c1c;
}
.tsq-discount-line {
    color: #15803d;
    font-weight: 600;
    font-size: 14px;
    margin: 8px 0 0;
    text-align: center;
}
.tsq-discount-line[hidden] {
    display: none;
}

/* Refund policy agreement (chargeback protection) */
.tsq-terms {
    margin: 14px 0;
}
.tsq-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}
.tsq-terms-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
