/**
 * InstantTrade Frontend Styles
 *
 * @package InstantTrade
 */

/* Price wrapper */
.instanttrade-price-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Discount badge */
.instanttrade-badge {
    display: inline-block;
    color: #fff;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 0.65em;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}

.instanttrade-badge-discount {
    background: var(--it-group-badge-color, #2c974b);
}

/* WooCommerce strikethrough - make it more subtle */
.instanttrade-price-wrap del {
    opacity: 0.55;
    font-size: 0.9em;
}

/* WooCommerce new price - emphasize */
.instanttrade-price-wrap ins {
    text-decoration: none;
    font-weight: 700;
}

/* Shop page (product cards) */
.woocommerce ul.products li.product .instanttrade-badge {
    font-size: 0.6em;
}

/* InstantFilter cards — badge top-right */
.if-card {
    position: relative;
}

.if-card > .instanttrade-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Single product page */
.single-product .summary .instanttrade-badge {
    font-size: 0.65em;
}

/* Cart & checkout */
.woocommerce-cart .instanttrade-badge,
.woocommerce-checkout .instanttrade-badge {
    font-size: 0.55em;
}

/* Variable products - price range */
.woocommerce-variation-price .instanttrade-badge {
    font-size: 0.75em;
}

/* Mini cart widget */
.widget_shopping_cart .instanttrade-badge {
    display: none;
}

/* =========================================================================
   REGISTRATION FORM
   ========================================================================= */

.ip-register-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.ip-register-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ip-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ip-form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.ip-form-field label .required {
    color: #e53935;
}

.ip-form-field input[type="text"],
.ip-form-field input[type="email"],
.ip-form-field input[type="tel"],
.ip-form-field select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ip-form-field input:focus,
.ip-form-field select:focus {
    outline: none;
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

/* Reverse-charge checkbox row */
.ip-vat-toggle-row .ip-vat-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.ip-vat-toggle-row .ip-vat-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.ip-vat-toggle-row .description {
    margin-top: 4px;
    font-size: 12px;
    color: #777;
}

.ip-form-field input.ip-error,
.ip-form-field select.ip-error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.ip-field-error {
    display: block;
    color: #e53935;
    font-size: 12px;
    margin-top: 4px;
}

/* Honeypot - invisible to users */
.ip-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Turnstile */
.ip-turnstile-container {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

/* Submit button */
.ip-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c4dff, #651fff);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    width: 100%;
}

.ip-register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.3);
}

.ip-register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ip-spinner {
    animation: ip-form-spin 1s linear infinite;
}

@keyframes ip-form-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.ip-form-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
}

.ip-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.ip-msg-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

@media (max-width: 480px) {
    .ip-form-row-2col {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   STAFFEL TIER TABLE
   ========================================================================= */

.ip-staffel-wrap {
    margin: 12px 0 16px;
}

.ip-staffel-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.ip-staffel-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s;
}

.ip-staffel-toggle:hover {
    background: #f8f8f8;
}

.ip-staffel-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.ip-staffel-open .ip-staffel-arrow {
    transform: rotate(180deg);
}

.ip-staffel-collapsed .ip-staffel-table {
    display: none;
    margin-top: 8px;
}

.ip-staffel-collapsed.ip-staffel-open .ip-staffel-table {
    display: table;
}

.ip-staffel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ip-staffel-table th {
    text-align: left;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border-bottom: 2px solid #eee;
}

.ip-staffel-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.ip-staffel-table tr.ip-tier-active {
    background: #f0faf4;
}

.ip-staffel-table tr.ip-tier-active:last-child td,
.ip-staffel-table tr:last-child.ip-tier-active td {
    font-weight: 600;
}

/* Campaign badge color */
.instanttrade-badge-campaign {
    background: var(--it-campaign-badge-color, #e65100);
}

/* Checkout: primary "Liever B2B-account?" CTA button under the billing email field
   (woocommerce_after_checkout_billing_form). Hidden for NL via JS toggle. */
.ip-checkout-register-btn-wrap {
    margin: 14px 0 22px 0;
    padding: 14px;
    background: #fff7ed;
    border: 1px solid #fde7c2;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
}
.ip-checkout-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #b45309;
    color: #fff !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.2;
    transition: background 0.15s ease;
}
.ip-checkout-register-btn:hover,
.ip-checkout-register-btn:focus {
    background: #92400e;
    color: #fff !important;
    text-decoration: none !important;
}
.ip-checkout-register-btn__arrow {
    font-size: 16px;
    line-height: 1;
}
.ip-checkout-register-btn__hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Checkout: B2B / VAT reverse-charge notice for non-NL guests
   Rendered above the "Place order" button (woocommerce_review_order_before_submit).
   Compact so it fits the order-review column. */
.ip-checkout-vat-notice {
    display: block;
    margin: 0 0 14px 0;
    padding: 10px 12px;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #1f2937;
}
.ip-checkout-vat-notice__inner { display: block; }
.ip-checkout-vat-notice strong { color: #b45309; display: inline-block; margin-right: 2px; }
.ip-checkout-vat-notice a { font-weight: 600; text-decoration: none; }
.ip-checkout-vat-notice__cta { color: #b45309; }
.ip-checkout-vat-notice__cta:hover { text-decoration: underline; }
.ip-checkout-vat-notice__login { margin-left: 4px; color: #6b7280; font-weight: 500; }
.ip-checkout-vat-notice__login:hover { text-decoration: underline; color: #374151; }

