/**
 * React Quote Request - Cart Button
 * Version: 1.6.4
 */

.ep-qr-quote-wrap {
    margin-top: 10px;
    text-align: left;
}

/* Elegant dark link button */
.ep-qr-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    color: #1a1a2e;
    border: none;
    cursor: pointer;
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
    position: relative;
}

.ep-qr-quote-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 22px;
    right: 0;
    height: 1px;
    background: rgba(62, 62, 62, 0);
    opacity: 0;
    transition: opacity 0.2s;
}

span.ep-qr-btn-title {
    color: #0f0e0e;
    text-transform: none;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 0 #fbfbfb;
}

button#ep-qr-submit-quote:hover {
    background-color: transparent;
    border-color: transparent;
}

.ep-qr-quote-btn:hover {
    color: #0f0f1a;
}

.ep-qr-quote-btn:hover::after {
    opacity: 1;
}

.ep-qr-quote-btn:active {
    opacity: 0.7;
}

.ep-qr-quote-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
}

.ep-qr-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-qr-btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Lock icon */
.ep-qr-btn-lock {
    display: none;
    margin-left: 2px;
}

.ep-qr-btn-lock svg {
    width: 12px;
    height: 12px;
}

/* Locked state */
.ep-qr-quote-btn.locked {
    color: #b0b0b8;
    cursor: not-allowed;
}

.ep-qr-quote-btn.locked:hover {
    color: #b0b0b8;
}

.ep-qr-quote-btn.locked:hover::after {
    opacity: 0;
}

.ep-qr-quote-btn.locked .ep-qr-btn-lock {
    display: inline-flex;
    align-items: center;
}

/* Min notice - always visible, under button */
.ep-qr-min-notice {
    display: block;
    margin-top: -2px;
    padding-left: 28px;
    font-size: 11.5px;
    color: #a0a0aa;
    font-weight: 400;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* Loading with spinner */
.ep-qr-quote-btn.loading {
    pointer-events: none;
    color: #6b6b78;
}

.ep-qr-quote-btn.loading::after {
    display: none;
}

.ep-qr-quote-btn.loading .ep-qr-btn-icon {
    display: none;
}

.ep-qr-quote-btn.loading .ep-qr-spinner {
    display: inline-block;
}

/* Spinner */
.ep-qr-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d4d4db;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: ep-qr-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes ep-qr-spin {
    to { transform: rotate(360deg); }
}

/* Success */
.ep-qr-quote-btn.success {
    color: #0d7a5f;
}

.ep-qr-quote-btn.success:hover {
    color: #0d7a5f;
}

.ep-qr-quote-btn.success:hover::after {
    opacity: 0;
}

/* Toast */
.ep-qr-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    max-width: 420px;
    line-height: 1.5;
    animation: ep-qr-toast-in 0.35s ease;
}

.ep-qr-toast.success {
    background: #fff;
    color: #155724;
    border-left: 4px solid #28a745;
}

.ep-qr-toast.error {
    background: #fff;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.ep-qr-toast a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
}

.ep-qr-toast a:hover {
    text-decoration: underline;
}

@keyframes ep-qr-toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .ep-qr-quote-btn { font-size: 13.5px; }
    .ep-qr-toast { left: 16px; right: 16px; top: 10px; max-width: none; }
    .ep-qr-modal { margin: 20px; padding: 28px 22px; }
}

/* ===== Modal ===== */
.ep-qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.45);
    backdrop-filter: blur(6px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ep-qr-fade-in 0.2s ease;
}

@keyframes ep-qr-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ep-qr-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 100%;
    margin: 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    text-align: center;
    animation: ep-qr-modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes ep-qr-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ep-qr-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: #f0f2f5;
    border-radius: 50%;
    margin-bottom: 18px;
}

.ep-qr-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.ep-qr-modal-text {
    font-size: 14px;
    color: #6b6b78;
    line-height: 1.6;
    margin: 0 0 20px;
}

.ep-qr-modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #e8e9ec;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.ep-qr-modal-total-label {
    font-size: 13px;
    color: #6b6b78;
    font-weight: 500;
}

.ep-qr-modal-total-value {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

.ep-qr-modal-actions {
    display: flex;
    gap: 10px;
}

.ep-qr-modal-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ep-qr-modal-btn.cancel {
    background: #f1f2f4;
    color: #4a4a58;
    border: 1px solid #e0e1e5;
}

.ep-qr-modal-btn.cancel:hover {
    background: #e4e5e9;
}

.ep-qr-modal-btn.confirm {
    background: #1a1a2e;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(26, 26, 46, 0.25);
}

.ep-qr-modal-btn.confirm:hover {
    background: #ffffff;
    color: #1a1a2e;
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.4);
    transform: translateY(-1px);
}

.ep-qr-modal-btn.confirm:active {
    transform: translateY(0);
}

/* Variation list - clean Amazon-style attributes */
.woocommerce-cart-form ul.variation,
.woocommerce-cart-form dl.variation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    color: #565959;
    list-style: none;
    padding: 4px 0 0;
    margin: 0;
    line-height: 1.5;
}

.woocommerce-cart-form ul.variation li,
.woocommerce-cart-form dl.variation dt,
.woocommerce-cart-form dl.variation dd {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    color: #565959;
    margin: 0;
    padding: 1px 0;
    display: inline;
}

.woocommerce-cart-form ul.variation li strong,
.woocommerce-cart-form ul.variation li label,
.woocommerce-cart-form dl.variation dt {
    color: #1a1a2e;
    font-weight: 600;
}

.woocommerce-cart-form ul.variation li p,
.woocommerce-cart-form dl.variation dd p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    color: #565959;
    margin: 0;
    display: inline;
}

/* Checkout page - variation styles */
.woocommerce-checkout-review-order-table ul.variation,
.woocommerce-checkout-review-order-table dl.variation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: #565959;
    list-style: none;
    padding: 4px 0 0;
    margin: 0;
    line-height: 1.5;
}

.woocommerce-checkout-review-order-table ul.variation li,
.woocommerce-checkout-review-order-table dl.variation dt,
.woocommerce-checkout-review-order-table dl.variation dd {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: #565959;
    margin: 0;
    padding: 1px 0;
    display: inline;
}

.woocommerce-checkout-review-order-table ul.variation li strong,
.woocommerce-checkout-review-order-table ul.variation li label,
.woocommerce-checkout-review-order-table dl.variation dt {
    color: #1a1a2e;
    font-weight: 600;
}

.woocommerce-checkout-review-order-table ul.variation li p,
.woocommerce-checkout-review-order-table dl.variation dd p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: #565959;
    margin: 0;
    display: inline;
}

/* Variation value span - reduced size */
span.item-variation-value {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: #565959;
}

/* Mini-cart widget - hide variation (shown on cart/checkout instead) */
.widget_shopping_cart_content ul.variation {
    display: none;
}

/* Mobile: sticky quote button under proceed-to-checkout */
@media (max-width: 768px) {
    div#ep-qr-quote-button-wrap {
        position: fixed;
        top: 82px;
        left: 0;
        right: 0;
        z-index: 99;
        background: #fff;
        margin: 0;
        padding: 8px 16px;
        border-bottom: 1px solid #e7e7e7;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        text-align: center;
    }

    div#ep-qr-quote-button-wrap .ep-qr-quote-btn {
        width: 100%;
        justify-content: center;
    }

    div#ep-qr-quote-button-wrap .ep-qr-min-notice {
        display: block;
        text-align: center;
        margin-top: 2px;
    }
}
