/**
 * Square Payment Gateway - Public Checkout Styles
 * Supports: Card, Gift Card, Google Pay, Apple Pay, Cash App, ACH, Afterpay
 */

/* ==============================
   Payment Method Tabs Grid
   ============================== */
.sq-payment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.sq-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1;
    white-space: nowrap;
    flex: 0 1 auto;
}

.sq-tab:hover {
    border-color: #94a3b8;
    color: #334155;
    background: #f1f5f9;
}

.sq-tab.sq-tab-active {
    border-color: #0f172a;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.sq-tab.sq-tab-active svg {
    stroke: #ffffff;
}

.sq-tab svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* ==============================
   Payment Panels
   ============================== */
.sq-panel {
    animation: sqFadeIn 0.25s ease;
}

@keyframes sqFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==============================
   Card & Gift Card Containers
   ============================== */
#square-card-container,
#square-gift-card-container {
    background: #fcfcfd;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 18px 16px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    min-height: 85px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

#square-card-container.sq-attached,
#square-gift-card-container.sq-attached {
    background: #ffffff;
    border-color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02), 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* ==============================
   Wallet Containers (Google Pay, Apple Pay, Cash App, Afterpay)
   ============================== */
#square-google-pay-container,
#square-apple-pay-container,
#square-cashapp-container,
#square-afterpay-container {
    min-height: 48px;
    margin-top: 4px;
}

/* ==============================
   ACH Note Styling
   ============================== */
.sq-ach-note {
    font-size: 13.5px;
    color: #475569;
    padding: 16px;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

/* ==============================
   Gateway Description
   ============================== */
.sq-gateway-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 15px;
}

.sq-gateway-redirect-note {
    font-size: 13px;
    color: #008771;
    font-weight: 600;
}

/* ==============================
   Error Display
   ============================== */
#square-payment-errors {
    animation: fadeInError 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==============================
   Responsive - Stack tabs on small screens
   ============================== */
@media (max-width: 480px) {
    .sq-payment-tabs {
        gap: 4px;
    }
    .sq-tab {
        font-size: 11px;
        padding: 7px 10px;
        gap: 4px;
    }
    .sq-tab svg {
        width: 14px;
        height: 14px;
    }
}