/* WC Fast Checkout — front-end styles */
:root {
    --wcfc-btn-bg: #111111;
    --wcfc-btn-text: #ffffff;
}

/* Buy Now button — wrap is full-width block so it lines up with add-to-cart. */
.wcfc-buy-now-wrap {
    display: block !important;
    width: 100% !important;
    margin: 12px 0 !important;
    clear: both;
}
.wcfc-buy-now-wrap--loop {
    display: block;
    width: 100%;
    margin: 6px 0;
}

/* Reset theme .button.alt inheritance and apply our own look. */
.wcfc-buy-now {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 24px !important;
    background: var(--wcfc-btn-bg) !important;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.06) 100%) !important;
    color: var(--wcfc-btn-text) !important;
    border: none !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 0 rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.10) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.wcfc-buy-now:hover,
.wcfc-buy-now:focus {
    transform: translateY(-1px) !important;
    filter: brightness(1.08) !important;
    box-shadow: 0 4px 0 rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.16) !important;
    outline: none !important;
}
.wcfc-buy-now:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 0 rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.10) !important;
}
.wcfc-buy-now__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}
.wcfc-buy-now-loop {
    padding: 12px 18px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

/* Modal */
.wcfc-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 12px;
    overflow-y: auto;
}
.wcfc-modal.is-open { display: flex; }
.wcfc-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 20, 0.55);
    backdrop-filter: blur(4px);
}
.wcfc-modal__dialog {
    position: relative;
    background: #fff;
    color: #1a1a1a;
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 24px;
    z-index: 1;
}
.wcfc-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}
.wcfc-modal__close:hover { color: #111; }
.wcfc-modal__title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}
.wcfc-modal__subtitle {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
}

/* Loading */
.wcfc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    color: #666;
    font-size: 14px;
}
.wcfc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #111;
    border-radius: 50%;
    animation: wcfc-spin .8s linear infinite;
}
@keyframes wcfc-spin { to { transform: rotate(360deg); } }

/* Product summary */
.wcfc-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 16px;
}
.wcfc-product img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}
.wcfc-product__meta { flex: 1; }
.wcfc-product__name { font-weight: 600; font-size: 15px; }
.wcfc-product__qty { color: #666; font-size: 13px; margin-top: 2px; }
.wcfc-product__price { font-weight: 700; font-size: 16px; }

/* Form */
.wcfc-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 16px;
}
.wcfc-fieldset legend {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #333;
    margin-bottom: 10px;
    padding: 0;
}
.wcfc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.wcfc-field { margin-bottom: 10px; }
.wcfc-field--full { grid-column: 1 / -1; }
.wcfc-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}
.wcfc-req { color: #d33; margin-left: 2px; }
.wcfc-field input,
.wcfc-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.3;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}
.wcfc-field input:focus,
.wcfc-field select:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}
.wcfc-field.has-error input,
.wcfc-field.has-error select {
    border-color: #d33;
    background: #fff8f8;
}
.wcfc-field-error {
    color: #c1272d;
    font-size: 12px;
    margin-top: 4px;
}

/* Gateways & shipping list */
.wcfc-gateways,
.wcfc-shipping-list {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.wcfc-gateway,
.wcfc-shipping {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    background: #fff;
    transition: background .15s ease;
}
.wcfc-gateway:last-child,
.wcfc-shipping:last-child { border-bottom: none; }
.wcfc-gateway:hover,
.wcfc-shipping:hover { background: #fafafa; }
.wcfc-gateway input,
.wcfc-shipping input { margin-top: 3px; }
.wcfc-gateway__label,
.wcfc-shipping__label {
    flex: 1;
    font-size: 14px;
}
.wcfc-gateway__title,
.wcfc-shipping__title {
    font-weight: 600;
}
.wcfc-gateway__description {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}
.wcfc-gateway__description p { margin: 0; }
.wcfc-shipping__cost { font-weight: 600; }

/* Checkbox */
.wcfc-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Totals */
.wcfc-totals {
    border-top: 1px solid #eee;
    margin: 16px 0;
    padding-top: 12px;
    font-size: 14px;
}
.wcfc-totals__row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #444;
}
.wcfc-totals__row--total {
    font-size: 17px;
    font-weight: 700;
    border-top: 1px solid #eee;
    margin-top: 6px;
    padding-top: 10px;
    color: #111;
}

/* Error box */
.wcfc-error {
    background: #fff5f5;
    border: 1px solid #f5c2c2;
    color: #b1252b;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Consents (terms/privacy/whatsapp) */
.wcfc-consents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 12px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}
.wcfc-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background .12s ease;
}
.wcfc-consent:hover { background: #f0f0f0; }
.wcfc-consent input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.wcfc-consent__text {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wcfc-consent__text a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wcfc-consent__icon {
    flex-shrink: 0;
    vertical-align: middle;
}
.wcfc-consent.has-error {
    background: #fff5f5;
    border: 1px solid #f5c2c2;
    animation: wcfc-shake 0.3s;
}
.wcfc-consent.has-error .wcfc-consent__text { color: #b1252b; }
.wcfc-consent--whatsapp {
    background: #f0fbf3;
    border: 1px solid #cce9d4;
}
.wcfc-consent--whatsapp:hover { background: #e2f5e9; }
@keyframes wcfc-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

/* Submit */
.wcfc-submit {
    width: 100%;
    padding: 14px 22px;
    background: var(--wcfc-btn-bg);
    color: var(--wcfc-btn-text);
    font-weight: 700;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}
.wcfc-submit:hover { transform: translateY(-1px); }
.wcfc-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.wcfc-legal {
    color: #777;
    font-size: 12px;
    text-align: center;
    margin: 10px 0 0;
}
.wcfc-legal a { color: #111; text-decoration: underline; }

/* Small screens */
@media (max-width: 480px) {
    .wcfc-row { grid-template-columns: 1fr; }
    .wcfc-modal__dialog { padding: 18px; border-radius: 8px; }
}

/* Prevent body scroll while modal open */
body.wcfc-modal-open { overflow: hidden; }

/* Scarcity / urgency — inline pill badges below the button. */
.wcfc-scarcity {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 4px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.3;
    align-items: center;
}
.wcfc-scarcity--compact {
    font-size: 11.5px;
    gap: 4px;
}
.wcfc-scarcity__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e6e2da;
    border-radius: 999px;
    color: #3a352d;
    white-space: nowrap;
    font-weight: 500;
}
.wcfc-scarcity__stock {
    background: #fff2ec;
    border-color: #ffc8ae;
    color: #a83600;
    font-weight: 600;
}
.wcfc-scarcity__countdown {
    background: #f6f3ff;
    border-color: #d4c6ff;
    color: #4c2fa6;
}
.wcfc-scarcity__countdown strong {
    font-variant-numeric: tabular-nums;
    color: #2a1470;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.wcfc-scarcity__viewers {
    background: #eefaf1;
    border-color: #bce6c8;
    color: #16663a;
}
.wcfc-scarcity__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e0501a;
    box-shadow: 0 0 0 0 rgba(224, 80, 26, .6);
    animation: wcfc-pulse 1.6s infinite;
    flex-shrink: 0;
}
@keyframes wcfc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(224, 80, 26, .55); }
    70%  { box-shadow: 0 0 0 8px rgba(224, 80, 26, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 80, 26, 0); }
}
.wcfc-scarcity__clock,
.wcfc-scarcity__eye {
    font-size: 13px;
    line-height: 1;
    opacity: .75;
}
.wcfc-scarcity__icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    opacity: .85;
}
