/**
 * DevVN Quick Buy - Modern CSS
 * Version: 2.0.0
 * 
 * This stylesheet uses CSS Custom Properties for easy theming
 * and modern CSS features for better maintainability.
 */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Colors */
    --devvn-primary: #c69a39;
    --devvn-primary-hover: #b08830;
    --devvn-primary-light: #c19a4b;
    --devvn-secondary: #fd6e1d;
    --devvn-secondary-hover: #f59000;
    --devvn-success: #00c700;
    --devvn-error: #dc3545;
    --devvn-text: #333333;
    --devvn-text-light: #666666;
    --devvn-text-muted: #999999;
    --devvn-border: #cccccc;
    --devvn-border-light: #dddddd;
    --devvn-bg: #ffffff;
    --devvn-bg-light: #f5f5f5;
    --devvn-overlay: rgba(0, 0, 0, 0.75);
    --devvn-shadow: rgba(0, 0, 0, 0.15);
    --devvn-price: #e03232;
    
    /* Typography */
    --devvn-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --devvn-font-family-alt: Tahoma, Arial, sans-serif;
    --devvn-font-size-xs: 12px;
    --devvn-font-size-sm: 14px;
    --devvn-font-size-base: 14px;
    --devvn-font-size-md: 16px;
    --devvn-font-size-lg: 18px;
    --devvn-line-height: 1.3125;
    
    /* Spacing */
    --devvn-spacing-xs: 4px;
    --devvn-spacing-sm: 8px;
    --devvn-spacing-md: 10px;
    --devvn-spacing-lg: 15px;
    --devvn-spacing-xl: 20px;
    
    /* Border radius */
    --devvn-radius-sm: 2px;
    --devvn-radius-md: 4px;
    --devvn-radius-lg: 8px;

    /* Transitions */
    --devvn-transition-fast: 0.15s ease;
    --devvn-transition: 0.25s ease;
    --devvn-transition-slow: 0.35s ease;
    
    /* Form elements */
    --devvn-input-height: 26px;
    --devvn-button-height: 36px;
    
    /* Popup dimensions */
    --devvn-popup-max-width: 750px;
    --devvn-popup-title-height: 42px;
}

/* ==========================================================================
   Magnific Popup Base Styles
   ========================================================================== */

.mfp-bg {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    overflow: hidden;
    position: fixed;
    background: #0b0b0b;
    opacity: 0.8;
}

.mfp-wrap {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    position: fixed;
    outline: none !important;
    backface-visibility: hidden;
}

.mfp-container {
    text-align: center;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    padding: 0 var(--devvn-spacing-sm);
    box-sizing: border-box;
}

.mfp-container:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}


.mfp-align-top .mfp-container:before {
    display: none;
}

.mfp-content {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 0 auto;
    text-align: left;
    z-index: 1045;
}

.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
    width: 100%;
    cursor: auto;
}

.mfp-ajax-cur {
    cursor: progress;
}

.mfp-zoom-out-cur,
.mfp-zoom-out-cur .mfp-image-holder .mfp-close {
    cursor: zoom-out;
}

.mfp-zoom {
    cursor: zoom-in;
}

.mfp-auto-cursor .mfp-content {
    cursor: auto;
}

.mfp-close,
.mfp-arrow,
.mfp-preloader,
.mfp-counter {
    user-select: none;
}

.mfp-loading.mfp-figure {
    display: none;
}

.mfp-hide {
    display: none !important;
}

.mfp-preloader {
    color: #ccc;
    position: absolute;
    top: 50%;
    width: auto;
    text-align: center;
    margin-top: -0.8em;
    left: var(--devvn-spacing-sm);
    right: var(--devvn-spacing-sm);
    z-index: 1044;
}


.mfp-preloader a {
    color: #ccc;
}

.mfp-preloader a:hover {
    color: #fff;
}

.mfp-s-ready .mfp-preloader {
    display: none;
}

.mfp-s-error .mfp-content {
    display: none;
}

button.mfp-close,
button.mfp-arrow {
    overflow: visible;
    cursor: pointer;
    background: transparent;
    border: 0;
    appearance: none;
    display: block;
    outline: none;
    padding: 0;
    z-index: 1046;
    box-shadow: none;
    touch-action: manipulation;
}

button::-moz-focus-inner {
    padding: 0;
    border: 0;
}

.mfp-close {
    width: 44px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    right: 0;
    top: 0;
    text-decoration: none;
    text-align: center;
    opacity: 0.65;
    padding: 0 0 18px 10px;
    color: #fff;
    font-style: normal;
    font-size: 28px;
    font-family: Arial, Baskerville, monospace;
    transition: opacity var(--devvn-transition-fast);
}

.mfp-close:hover,
.mfp-close:focus {
    opacity: 1;
}

.mfp-close:active {
    top: 1px;
}


.mfp-close-btn-in .mfp-close {
    color: var(--devvn-text);
}

.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
    color: #fff;
    right: -6px;
    text-align: right;
    padding-right: 6px;
    width: 100%;
}

.mfp-counter {
    position: absolute;
    top: 0;
    right: 0;
    color: #ccc;
    font-size: var(--devvn-font-size-xs);
    line-height: 18px;
    white-space: nowrap;
}

.mfp-arrow {
    position: absolute;
    opacity: 0.65;
    margin: 0;
    top: 50%;
    margin-top: -55px;
    padding: 0;
    width: 90px;
    height: 110px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--devvn-transition-fast);
}

.mfp-arrow:active {
    margin-top: -54px;
}

.mfp-arrow:hover,
.mfp-arrow:focus {
    opacity: 1;
}

.mfp-arrow:before,
.mfp-arrow:after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    position: absolute;
    left: 0;
    top: 0;
    margin-top: 35px;
    margin-left: 35px;
    border: medium inset transparent;
}

.mfp-arrow:after {
    border-top-width: 13px;
    border-bottom-width: 13px;
    top: 8px;
}


.mfp-arrow:before {
    border-top-width: 21px;
    border-bottom-width: 21px;
    opacity: 0.7;
}

.mfp-arrow-left {
    left: 0;
}

.mfp-arrow-left:after {
    border-right: 17px solid #fff;
    margin-left: 31px;
}

.mfp-arrow-left:before {
    margin-left: 25px;
    border-right: 27px solid #3f3f3f;
}

.mfp-arrow-right {
    right: 0;
}

.mfp-arrow-right:after {
    border-left: 17px solid #fff;
    margin-left: 39px;
}

.mfp-arrow-right:before {
    border-left: 27px solid #3f3f3f;
}

.mfp-iframe-holder {
    padding-top: 40px;
    padding-bottom: 40px;
}

.mfp-iframe-holder .mfp-content {
    line-height: 0;
    width: 100%;
    max-width: 900px;
}

.mfp-iframe-holder .mfp-close {
    top: -40px;
}

.mfp-iframe-scaler {
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-top: 56.25%;
}

.mfp-iframe-scaler iframe {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 8px var(--devvn-shadow);
    background: #000;
}


img.mfp-img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    line-height: 0;
    box-sizing: border-box;
    padding: 40px 0;
    margin: 0 auto;
}

.mfp-figure {
    line-height: 0;
}

.mfp-figure:after {
    content: '';
    position: absolute;
    left: 0;
    top: 40px;
    bottom: 40px;
    display: block;
    right: 0;
    width: auto;
    height: auto;
    z-index: -1;
    box-shadow: 0 0 8px var(--devvn-shadow);
    background: #444;
}

.mfp-figure small {
    color: #bdbdbd;
    display: block;
    font-size: var(--devvn-font-size-xs);
    line-height: 14px;
}

.mfp-figure figure {
    margin: 0;
}

.mfp-bottom-bar {
    margin-top: -36px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    cursor: auto;
}

.mfp-title {
    text-align: left;
    line-height: 18px;
    color: #f3f3f3;
    word-wrap: break-word;
    padding-right: 36px;
}

.mfp-image-holder .mfp-content {
    max-width: 100%;
}

.mfp-gallery .mfp-image-holder .mfp-figure {
    cursor: pointer;
}


/* ==========================================================================
   DevVN Quick Buy - Main Styles
   ========================================================================== */

/* Box sizing reset */
.devvn-popup-quickbuy,
.devvn-popup-quickbuy * {
    box-sizing: border-box;
}

/* Clearfix */
.devvn-popup-content:after,
.devvn-popup-prod:after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   Modern Card-Based Design System
   ========================================================================== */

/* Card container for sections */
.devvn-popup-card {
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-lg);
    padding: var(--devvn-spacing-lg);
    margin-bottom: var(--devvn-spacing-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--devvn-border-light);
}

.devvn-popup-card:last-child {
    margin-bottom: 0;
}

/* Section headers with visual hierarchy */
.devvn-section-header {
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-sm);
    margin-bottom: var(--devvn-spacing-md);
    padding-bottom: var(--devvn-spacing-sm);
    border-bottom: 2px solid var(--devvn-bg-light);
}

.devvn-section-header__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--devvn-primary), var(--devvn-primary-light));
    color: #fff;
    border-radius: var(--devvn-radius-md);
    font-size: var(--devvn-font-size-sm);
}

.devvn-section-header__title {
    font-size: var(--devvn-font-size-md);
    font-weight: 600;
    color: var(--devvn-text);
    margin: 0;
}

.devvn-section-header__subtitle {
    font-size: var(--devvn-font-size-xs);
    color: var(--devvn-text-muted);
    margin-left: auto;
}

/* ==========================================================================
   Buy Now Button - Modern Style
   ========================================================================== */

a.devvn_buy_now_style {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clear: both;
    padding: 12px 24px;
    border-radius: var(--devvn-radius-md);
    font-size: var(--devvn-font-size-md);
    line-height: 1.4;
    text-transform: uppercase;
    color: #fff !important;
    text-align: center;
    background: linear-gradient(135deg, var(--devvn-secondary), var(--devvn-secondary-hover));
    margin: 10px 0 var(--devvn-spacing-xl);
    text-decoration: none !important;
    border: none !important;
    border-bottom: 0 !important;
    max-width: 350px;
    width: 100%;
    min-height: 54px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(253, 110, 29, 0.25);
    transition: all var(--devvn-transition);
}

a.devvn_buy_now_style::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

a.devvn_buy_now_style:hover,
a.devvn_buy_now_style:focus {
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--devvn-secondary-hover), var(--devvn-secondary));
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 110, 29, 0.35);
}

a.devvn_buy_now_style:hover::before {
    left: 100%;
}

a.devvn_buy_now_style:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(253, 110, 29, 0.25);
}

a.devvn_buy_now_style strong {
    display: block;
    font-size: var(--devvn-font-size-md);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

a.devvn_buy_now_style span {
    display: block;
    font-size: var(--devvn-font-size-xs);
    color: rgba(255, 255, 255, 0.9);
    text-transform: none;
    font-weight: 400;
    line-height: 1.3;
}

/* Small link style button */
a.devvn_buy_now_ajax {
    display: inline-block;
    color: var(--devvn-secondary);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--devvn-secondary);
    border-radius: var(--devvn-radius-md);
    transition: all var(--devvn-transition);
}

a.devvn_buy_now_ajax:hover {
    background: var(--devvn-secondary);
    color: #fff;
}


/* ==========================================================================
   Popup Container - Modern Card Design
   ========================================================================== */

.devvn-popup {
    width: 100%;
    height: 100%;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--devvn-overlay);
    z-index: 9999999999;
    opacity: 0;
    transition: opacity var(--devvn-transition);
}

.devvn-popup.is-visible {
    opacity: 1;
}

.devvn-popup-inner {
    width: 100%;
    max-width: var(--devvn-popup-max-width);
    margin: 0 auto var(--devvn-spacing-md);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: var(--devvn-radius-lg);
    background: var(--devvn-bg-light);
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform var(--devvn-transition-slow), box-shadow var(--devvn-transition);
}

.devvn-popup.is-visible .devvn-popup-inner {
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   Popup Title - Modern Header
   ========================================================================== */

.devvn-popup-title {
    background: linear-gradient(135deg, var(--devvn-primary), var(--devvn-primary-light));
    color: #fff;
    min-height: var(--devvn-popup-title-height);
    padding: var(--devvn-spacing-md) var(--devvn-spacing-xl);
    padding-right: 50px;
    font-size: var(--devvn-font-size-md);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
}

.devvn-popup-title span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   Popup Close Button - Modern Style
   ========================================================================== */

.devvn-popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: var(--devvn-spacing-md);
    transform: translateY(-50%);
    transition: transform var(--devvn-transition), background-color var(--devvn-transition);
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    background-image: url(../images/close.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px auto;
    overflow: hidden;
    text-indent: -9999px;
    border: 0 solid transparent;
    border-radius: var(--devvn-radius-md);
    outline: none;
    appearance: none !important;
    margin: 0;
    padding: 0;
    min-height: inherit;
    cursor: pointer;
}

.devvn-popup-close:hover {
    transform: translateY(-50%) rotate(90deg);
    background-color: rgba(255, 255, 255, 0.25);
}

.devvn-popup-close:focus {
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ==========================================================================
   Popup Content - Modern Layout
   ========================================================================== */

.devvn-popup-content {
    padding: var(--devvn-spacing-lg);
    background: var(--devvn-bg-light);
}

.devvn-popup-quickbuy {
    line-height: 1.5;
    color: var(--devvn-text);
    font-family: var(--devvn-font-family);
    font-size: var(--devvn-font-size-base);
    font-weight: 400;
}


/* ==========================================================================
   Product Info Section - Modern Card Style
   ========================================================================== */

.devvn-popup-prod {
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-md);
    padding: var(--devvn-spacing-md);
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-lg);
    margin-bottom: var(--devvn-spacing-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--devvn-border-light);
}

.devvn-popup-img {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: var(--devvn-radius-md);
    overflow: hidden;
    background: var(--devvn-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.devvn-popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--devvn-radius-md);
}

.devvn-popup-info {
    flex: 1;
    min-width: 0;
}

span.devvn_title {
    font-size: var(--devvn-font-size-md);
    color: var(--devvn-text);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--devvn-spacing-sm);
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

span.devvn_price {
    font-size: var(--devvn-font-size-lg);
    color: var(--devvn-price);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-sm);
}

span.devvn_price del {
    font-size: var(--devvn-font-size-sm);
    color: var(--devvn-text-muted);
    font-weight: 400;
    text-decoration: line-through;
}

span.devvn_price ins {
    text-decoration: none;
    background: none;
}


/* ==========================================================================
   Content Layout (Two Columns) - Modern Grid
   ========================================================================== */

.devvn-popup-content-left {
    width: 50%;
    float: left;
    padding-right: var(--devvn-spacing-md);
}

.devvn-popup-content-right {
    width: 50%;
    float: right;
    padding-left: var(--devvn-spacing-md);
}

/* Form container card */
.devvn-popup-content-right .popup-customer-info {
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-lg);
    padding: var(--devvn-spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--devvn-border-light);
}

/* Product description card */
.devvn-popup-content-desc {
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-lg);
    padding: var(--devvn-spacing-md);
    font-size: var(--devvn-font-size-sm);
    color: var(--devvn-text-light);
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--devvn-border-light);
}

.devvn-popup-content-desc:empty {
    display: none;
}

/* ==========================================================================
   Customer Info Form - Modern Styling
   ========================================================================== */

.popup-customer-info-title {
    font-size: var(--devvn-font-size-md);
    color: var(--devvn-text);
    margin-bottom: var(--devvn-spacing-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-sm);
}

.popup-customer-info-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(135deg, var(--devvn-primary), var(--devvn-secondary));
    border-radius: 2px;
}

.popup-customer-info-title.customer_coupon_title {
    font-size: var(--devvn-font-size-sm);
    margin-bottom: var(--devvn-spacing-sm);
    margin-top: var(--devvn-spacing-md);
    padding-top: var(--devvn-spacing-md);
    border-top: 1px solid var(--devvn-border-light);
}

.popup-customer-info-title.customer_coupon_title::before {
    height: 14px;
}

.popup-customer-info-group {
    width: 100%;
    margin-bottom: var(--devvn-spacing-sm);
}

.popup-customer-info-group:after {
    display: block;
    content: " ";
    clear: both;
}

form#devvn_cusstom_info {
    margin-bottom: 0;
}

/* Form Grid Layout */
.popup-customer-info-item-13 {
    width: 30%;
    float: left;
    padding-right: 3px;
}

.popup-customer-info-item-23 {
    width: 70%;
    float: left;
    padding-left: 3px;
}

.popup-customer-info-item-2 {
    width: 50%;
    float: left;
}


.popup-customer-info-group .popup-customer-info-item-2:first-child {
    padding-right: 3px;
}

.popup-customer-info-group .popup-customer-info-item-2:last-child {
    padding-left: 3px;
}

[class*="popup-customer-info-item-3-"] {
    width: 33.333%;
    float: left;
}

.popup-customer-info-item-3-13 {
    padding-right: 2px;
}

.popup-customer-info-item-3-23 {
    padding-right: 2px;
}

.popup-customer-info-item-1 {
    overflow: hidden;
}

/* ==========================================================================
   Form Inputs - Modern Styling with States
   ========================================================================== */

/* Input wrapper for icon positioning */
.popup-customer-info-item-1,
.popup-customer-info-item-2,
.popup-customer-info-item-13,
.popup-customer-info-item-23,
[class*="popup-customer-info-item-3-"] {
    position: relative;
}

body .popup-customer-info-group input,
body .popup-customer-info-group select,
body .popup-customer-info-group textarea {
    font-size: var(--devvn-font-size-sm);
    padding: var(--devvn-spacing-sm) var(--devvn-spacing-md);
    border: 2px solid var(--devvn-border-light);
    width: 100%;
    height: 40px;
    box-shadow: none;
    margin: 0;
    font-family: var(--devvn-font-family);
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-md);
    transition: 
        border-color var(--devvn-transition-fast), 
        box-shadow var(--devvn-transition-fast),
        background-color var(--devvn-transition-fast);
    color: var(--devvn-text);
}

body .popup-customer-info-group input::placeholder,
body .popup-customer-info-group textarea::placeholder {
    color: var(--devvn-text-muted);
    opacity: 1;
}

/* Focus States - Enhanced */
body .popup-customer-info-group input:focus,
body .popup-customer-info-group select:focus,
body .popup-customer-info-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(198, 154, 57, 0.15);
    border-color: var(--devvn-primary);
    background: var(--devvn-bg);
    outline: none;
}

/* Hover States */
body .popup-customer-info-group input:hover:not(:focus):not(.error):not(.valid),
body .popup-customer-info-group select:hover:not(:focus):not(.error):not(.valid),
body .popup-customer-info-group textarea:hover:not(:focus):not(.error):not(.valid) {
    border-color: var(--devvn-border);
}

body .popup-customer-info-group textarea {
    height: 60px;
    min-height: 60px;
    resize: vertical;
    line-height: 1.5;
}

/* ==========================================================================
   Form Field States - Error & Success
   ========================================================================== */

/* Error States - Red border with icon */
.popup-customer-info-group .error,
.popup-customer-info-group input.error,
.popup-customer-info-group select.error,
.popup-customer-info-group textarea.error {
    border-color: var(--devvn-error) !important;
    background-color: rgba(220, 53, 69, 0.03) !important;
    padding-right: 38px !important;
}

.popup-customer-info-group .error:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
}

/* Error icon indicator */
.popup-customer-info-group input.error,
.popup-customer-info-group select.error,
.popup-customer-info-group textarea.error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

/* Success States - Green border with checkmark */
.popup-customer-info-group input.valid,
.popup-customer-info-group select.valid,
.popup-customer-info-group textarea.valid {
    border-color: var(--devvn-success) !important;
    background-color: rgba(0, 199, 0, 0.03) !important;
    padding-right: 38px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300c700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

.popup-customer-info-group input.valid:focus,
.popup-customer-info-group select.valid:focus,
.popup-customer-info-group textarea.valid:focus {
    box-shadow: 0 0 0 4px rgba(0, 199, 0, 0.15) !important;
}

/* Error message label */
.popup-customer-info-group label.error {
    display: none !important;
}

.popup-customer-info-group .devvn_quickbuy_mess label.error {
    display: flex !important;
    align-items: center;
    gap: var(--devvn-spacing-xs);
    font-weight: 500;
    color: var(--devvn-error);
    font-size: var(--devvn-font-size-xs);
    margin-top: var(--devvn-spacing-xs);
    padding: var(--devvn-spacing-xs) var(--devvn-spacing-sm);
    background: rgba(220, 53, 69, 0.08);
    border-radius: var(--devvn-radius-sm);
}

.popup-customer-info-group .devvn_quickbuy_mess label.error::before {
    content: '';
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Field-level error message (inline) */
.popup-customer-info-group .field-error-message {
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-xs);
    font-size: var(--devvn-font-size-xs);
    color: var(--devvn-error);
    margin-top: var(--devvn-spacing-xs);
    animation: slideDown var(--devvn-transition-fast);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Submit Button - Modern CTA Style
   ========================================================================== */

.popup-customer-info-group .devvn-order-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--devvn-secondary), var(--devvn-secondary-hover));
    color: #fff;
    font-size: var(--devvn-font-size-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--devvn-radius-md);
    cursor: pointer;
    outline: none;
    position: relative;
    overflow: hidden;
    margin: var(--devvn-spacing-md) 0 0;
    padding: 0;
    transition: 
        transform var(--devvn-transition-fast), 
        box-shadow var(--devvn-transition),
        filter var(--devvn-transition-fast);
}

.popup-customer-info-group .devvn-order-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.popup-customer-info-group .devvn-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 110, 29, 0.35);
    filter: brightness(1.05);
}

.popup-customer-info-group .devvn-order-btn:hover::before {
    left: 100%;
}

.popup-customer-info-group .devvn-order-btn:focus {
    outline: 2px solid var(--devvn-secondary);
    outline-offset: 2px;
}

.popup-customer-info-group .devvn-order-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(253, 110, 29, 0.25);
}


/* ==========================================================================
   Loading States - Modern Spinner
   ========================================================================== */

.popup_loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.popup_loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--devvn-radius-md);
    z-index: 1;
}

.popup-customer-info-group .devvn-order-btn.loading:after,
.popup_loading:after {
    animation: devvn_spin 800ms infinite linear;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff !important;
    content: "";
    display: block;
    height: 22px;
    width: 22px;
    top: 50%;
    margin-top: -11px;
    left: 50%;
    margin-left: -11px;
    position: absolute;
    z-index: 2;
}

.popup_loading:after {
    border: 3px solid rgba(198, 154, 57, 0.2);
    border-top-color: var(--devvn-primary) !important;
}

@keyframes devvn_spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.popup-customer-info-group .devvn-order-btn.loading {
    opacity: 1 !important;
    position: relative;
    color: transparent;
    pointer-events: none !important;
    background: linear-gradient(135deg, var(--devvn-secondary), var(--devvn-secondary-hover));
}

.popup-customer-info-group .devvn-order-btn.loading::before {
    display: none;
}

/* Full page loading overlay */
.devvn-popup-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--devvn-radius-lg);
}

.devvn-popup-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--devvn-bg-light);
    border-top-color: var(--devvn-primary);
    border-radius: 50%;
    animation: devvn_spin 800ms infinite linear;
}

.devvn-popup-loading-text {
    margin-top: var(--devvn-spacing-md);
    font-size: var(--devvn-font-size-sm);
    color: var(--devvn-text-light);
    font-weight: 500;
}

/* ==========================================================================
   Success Message - Modern Design with Animation
   ========================================================================== */

.popup-message.success {
    background: linear-gradient(135deg, rgba(0, 199, 0, 0.05), rgba(0, 199, 0, 0.02));
    border: 1px solid rgba(0, 199, 0, 0.2);
    border-radius: var(--devvn-radius-lg);
    padding: var(--devvn-spacing-xl);
    text-align: center;
    animation: successFadeIn 0.5s ease-out;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Success icon with animation */
.devvn-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--devvn-spacing-lg);
    background: linear-gradient(135deg, var(--devvn-success), #00a000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease-out 0.2s both;
    box-shadow: 0 8px 24px rgba(0, 199, 0, 0.3);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.devvn-success-icon::after {
    content: '';
    width: 28px;
    height: 14px;
    border-left: 4px solid #fff;
    border-bottom: 4px solid #fff;
    transform: rotate(-45deg) translateY(-2px);
    animation: checkDraw 0.3s ease-out 0.5s both;
}

@keyframes checkDraw {
    from {
        width: 0;
        height: 0;
    }
    50% {
        width: 14px;
        height: 0;
    }
    100% {
        width: 28px;
        height: 14px;
    }
}

/* Success title */
.devvn-success-title {
    font-size: var(--devvn-font-size-xl);
    font-weight: 700;
    color: var(--devvn-success);
    margin-bottom: var(--devvn-spacing-sm);
    animation: fadeIn 0.4s ease-out 0.4s both;
}

/* Success message text */
.devvn-success-message {
    font-size: var(--devvn-font-size-sm);
    color: var(--devvn-text-light);
    margin-bottom: var(--devvn-spacing-lg);
    line-height: 1.6;
    animation: fadeIn 0.4s ease-out 0.5s both;
}

/* Order details card */
.devvn-success-details {
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-md);
    padding: var(--devvn-spacing-md);
    margin-bottom: var(--devvn-spacing-lg);
    text-align: left;
    animation: fadeIn 0.4s ease-out 0.6s both;
    border: 1px solid var(--devvn-border-light);
}

.devvn-success-details__row {
    display: flex;
    justify-content: space-between;
    padding: var(--devvn-spacing-sm) 0;
    border-bottom: 1px solid var(--devvn-border-light);
}

.devvn-success-details__row:last-child {
    border-bottom: none;
}

.devvn-success-details__label {
    color: var(--devvn-text-light);
    font-size: var(--devvn-font-size-sm);
}

.devvn-success-details__value {
    color: var(--devvn-text);
    font-weight: 600;
    font-size: var(--devvn-font-size-sm);
}

/* Next steps section */
.devvn-success-next-steps {
    background: var(--devvn-bg);
    border-radius: var(--devvn-radius-md);
    padding: var(--devvn-spacing-md);
    text-align: left;
    animation: fadeIn 0.4s ease-out 0.7s both;
    border: 1px solid var(--devvn-border-light);
}

.devvn-success-next-steps__title {
    font-size: var(--devvn-font-size-sm);
    font-weight: 600;
    color: var(--devvn-text);
    margin-bottom: var(--devvn-spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--devvn-spacing-sm);
}

.devvn-success-next-steps__title::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--devvn-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.devvn-success-next-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.devvn-success-next-steps__list li {
    font-size: var(--devvn-font-size-sm);
    color: var(--devvn-text-light);
    padding: var(--devvn-spacing-xs) 0;
    padding-left: var(--devvn-spacing-lg);
    position: relative;
}

.devvn-success-next-steps__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--devvn-primary);
    border-radius: 50%;
}

/* Success action buttons */
.devvn-success-actions {
    display: flex;
    gap: var(--devvn-spacing-md);
    justify-content: center;
    margin-top: var(--devvn-spacing-lg);
    animation: fadeIn 0.4s ease-out 0.8s both;
}

.devvn-success-btn {
    padding: var(--devvn-spacing-sm) var(--devvn-spacing-lg);
    border-radius: var(--devvn-radius-md);
    font-size: var(--devvn-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--devvn-transition-fast);
    cursor: pointer;
    border: none;
}

.devvn-success-btn--primary {
    background: linear-gradient(135deg, var(--devvn-primary), var(--devvn-primary-light));
    color: #fff;
}

.devvn-success-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(198, 154, 57, 0.3);
}

.devvn-success-btn--secondary {
    background: var(--devvn-bg);
    color: var(--devvn-text);
    border: 1px solid var(--devvn-border);
}

.devvn-success-btn--secondary:hover {
    background: var(--devvn-bg-light);
    border-color: var(--devvn-border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   Radio Buttons (Gender, Payment Method)
   ========================================================================== */

.popup-customer-info-radio label {
    display: inline-block;
    font-weight: 400;
    position: relative;
    cursor: pointer;
    margin: 0;
    transition: color var(--devvn-transition-fast);
}

.popup-customer-info-radio label:hover {
    color: var(--devvn-primary);
}

.popup-customer-info-radio label input {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.popup-customer-info-radio label span {
    padding-left: 23px;
    display: block;
}

.popup-customer-info-radio label span:before,
.popup-customer-info-radio label span:after {
    width: 16px;
    height: 16px;
    content: "";
    position: absolute;
    border: 1px solid #a6a6a6;
    border-radius: 50%;
    top: 1px;
    left: 0;
    transition: border-color var(--devvn-transition-fast), background-color var(--devvn-transition-fast);
}

.popup-customer-info-radio label input:checked ~ span:before {
    border: 1px solid var(--devvn-secondary);
}

.popup-customer-info-radio label input:checked ~ span:after {
    background: var(--devvn-secondary);
    border: 1px solid var(--devvn-secondary);
    width: 8px;
    height: 8px;
    top: 5px;
    left: 4px;
}

.popup-customer-info-radio label input:focus ~ span:before {
    box-shadow: 0 0 0 3px rgba(253, 110, 29, 0.2);
}

.popup-customer-info-radio label ~ label {
    margin-left: var(--devvn-spacing-xl);
}


/* Payment Method Radio */
.popup-customer-info-radio.paymentmethob-wrap label {
    display: block;
    margin: 0 0 var(--devvn-spacing-md);
}

.popup-customer-info-radio.paymentmethob-wrap label ~ label {
    margin-left: 0;
}

.popup-customer-info-group.paymentmethob-wrap {
    font-size: var(--devvn-font-size-sm);
}

/* ==========================================================================
   Variable Products
   ========================================================================== */

.devvn_prod_variable a.contact_to_buy_ajax,
.devvn_prod_variable .single_add_to_cart_button {
    display: none !important;
}

/* Container for quantity + button Mua ngay */
.devvn_prod_variable form.cart {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 12px;
}

/* Quantity wrapper - contains label, input and buttons */
.devvn_prod_variable .quantity_buttons_added,
.devvn_prod_variable .quantity {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 8px;
    vertical-align: middle;
    position: relative;
}

/* Ẩn TẤT CẢ label HTML từ theme và WooCommerce - QUAN TRỌNG */
.devvn_prod_variable .quantity label,
.devvn_prod_variable .quantity > label,
.devvn_prod_variable .quantity .screen-reader-text,
.devvn_prod_variable .quantity_buttons_added > label,
.devvn_prod_variable .quantity_buttons_added label,
.devvn_prod_variable .quantity_buttons_added .screen-reader-text,
.devvn_prod_variable .quantity_buttons_added .qty-reader-text,
.devvn_prod_variable .quantity_buttons_added label.screen-reader-text,
.devvn_prod_variable .quantity_buttons_added label.qty-reader-text,
.devvn_prod_variable form.cart > label,
.devvn_prod_variable .woocommerce-variation-add-to-cart > label,
.devvn_prod_variable label[for="quantity"],
.devvn_prod_variable label[for*="quantity_"],
.devvn_prod_variable label.qty-label,
.devvn-popup-quickbuy .quantity_buttons_added label,
.devvn-popup-quickbuy .quantity_buttons_added .screen-reader-text,
.devvn-popup-quickbuy .quantity_buttons_added .qty-reader-text,
.devvn-popup-quickbuy .quantity label,
.devvn-popup-quickbuy label.screen-reader-text,
.devvn-popup-quickbuy label.qty-reader-text {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Thêm label "Số lượng" duy nhất qua CSS pseudo-element */
.devvn_prod_variable .quantity_buttons_added::before,
.devvn-popup-quickbuy .quantity_buttons_added::before {
    content: "Số lượng" !important;
    font-size: var(--devvn-font-size-sm) !important;
    font-weight: 500 !important;
    color: var(--devvn-text) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    order: -100 !important;
    display: inline-block !important;
    visibility: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    clip: auto !important;
    clip-path: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
}

/* Nếu không có wrapper quantity_buttons_added, thêm label vào .quantity */
.devvn_prod_variable .quantity:not(.quantity_buttons_added .quantity)::before,
.devvn-popup-quickbuy .quantity:not(.quantity_buttons_added .quantity)::before {
    content: "Số lượng" !important;
    font-size: var(--devvn-font-size-sm) !important;
    font-weight: 500 !important;
    color: var(--devvn-text) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    order: -100 !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* Nếu .quantity nằm trong .quantity_buttons_added thì KHÔNG hiện label */
.devvn_prod_variable .quantity_buttons_added .quantity::before,
.devvn-popup-quickbuy .quantity_buttons_added .quantity::before {
    content: none !important;
    display: none !important;
}

/* Input number - đặt order để nằm sau label */
.devvn_prod_variable .quantity input[type="number"],
.devvn_prod_variable .quantity input.qty,
.devvn_prod_variable .quantity_buttons_added input[type="number"],
.devvn_prod_variable .quantity_buttons_added input.qty {
    width: 55px !important;
    height: 38px !important;
    text-align: center;
    margin: 0 !important;
    padding: 0 5px !important;
    border: 1px solid var(--devvn-border-light);
    border-radius: var(--devvn-radius-sm);
    -moz-appearance: textfield;
    font-size: var(--devvn-font-size-sm);
    font-weight: 500;
    order: 0;
}

.devvn_prod_variable .quantity input[type="number"]::-webkit-outer-spin-button,
.devvn_prod_variable .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons +/- */
.devvn_prod_variable .quantity button,
.devvn_prod_variable .quantity .qty-btn,
.devvn_prod_variable .quantity .minus,
.devvn_prod_variable .quantity .plus,
.devvn_prod_variable .quantity_buttons_added button,
.devvn_prod_variable .quantity_buttons_added .qty-btn,
.devvn_prod_variable .quantity_buttons_added .minus,
.devvn_prod_variable .quantity_buttons_added .plus {
    width: 32px;
    height: 38px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--devvn-border-light);
    background: var(--devvn-bg-light);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--devvn-radius-sm);
    transition: all var(--devvn-transition-fast);
    order: 1;
}

.devvn_prod_variable .quantity .minus,
.devvn_prod_variable .quantity_buttons_added .minus {
    order: -1;
}

.devvn_prod_variable .quantity .plus,
.devvn_prod_variable .quantity_buttons_added .plus {
    order: 2;
}

.devvn_prod_variable .quantity button:hover,
.devvn_prod_variable .quantity .qty-btn:hover,
.devvn_prod_variable .quantity .minus:hover,
.devvn_prod_variable .quantity .plus:hover,
.devvn_prod_variable .quantity_buttons_added button:hover,
.devvn_prod_variable .quantity_buttons_added .minus:hover,
.devvn_prod_variable .quantity_buttons_added .plus:hover {
    background: var(--devvn-primary);
    border-color: var(--devvn-primary);
    color: #fff;
}

.devvn_prod_variable {
    margin: 0 0 var(--devvn-spacing-lg);
}

.devvn_prod_variable .label {
    color: var(--devvn-text);
    font-size: var(--devvn-font-size-sm);
    padding-right: var(--devvn-spacing-md) !important;
}

.devvn_prod_variable .variations td {
    padding: 0 0 var(--devvn-spacing-md);
    vertical-align: text-bottom;
    border: 0;
}

.devvn-popup-quickbuy table.variations {
    margin: 0;
    border: 0;
}

.devvn_prod_variable a.reset_variations {
    margin: 0 0 0 var(--devvn-spacing-md);
}


.devvn_prod_variable span.price {
    color: var(--devvn-price);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--devvn-font-size-sm);
}

.devvn_prod_variable span.price ins {
    text-decoration: none;
}

.devvn_prod_variable span.price del {
    color: var(--devvn-border);
    font-weight: 400;
    font-size: var(--devvn-font-size-xs);
}

/* ==========================================================================
   Shipping Section
   ========================================================================== */

.popup_quickbuy_shipping {
    display: flex;
    align-items: flex-start;
}

.popup_quickbuy_shipping_title {
    padding-right: var(--devvn-spacing-md);
    font-weight: 600;
}

.popup_quickbuy_total_calc {
    font-weight: 700;
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li,
.popup_quickbuy_shipping_calc ul#shipping_method li {
    padding: 0;
    margin: 0 0 5px;
    position: relative;
    text-indent: inherit;
    list-style: none;
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li input,
.popup_quickbuy_shipping_calc ul#shipping_method li input {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li label,
.popup_quickbuy_shipping_calc ul#shipping_method li label {
    font-weight: 400;
    display: block;
    cursor: pointer;
    position: relative;
    padding: 0 0 0 23px;
    margin: 0;
    transition: color var(--devvn-transition-fast);
}


.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li label:hover,
.popup_quickbuy_shipping_calc ul#shipping_method li label:hover {
    color: var(--devvn-primary);
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li label:after,
.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li label:before,
.popup_quickbuy_shipping_calc ul#shipping_method li label:after,
.popup_quickbuy_shipping_calc ul#shipping_method li label:before {
    width: 16px;
    height: 16px;
    content: "";
    position: absolute;
    border: 1px solid #a6a6a6;
    border-radius: 50%;
    top: 1px;
    left: 0;
    transition: border-color var(--devvn-transition-fast), background-color var(--devvn-transition-fast);
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li input:checked ~ label:before,
.popup_quickbuy_shipping_calc ul#shipping_method li input:checked ~ label:before {
    border: 1px solid var(--devvn-secondary);
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li input:checked ~ label:after,
.popup_quickbuy_shipping_calc ul#shipping_method li input:checked ~ label:after {
    background: var(--devvn-secondary);
    border: 1px solid var(--devvn-secondary);
    width: 8px;
    height: 8px;
    top: 5px;
    left: 4px;
}

.woocommerce .popup_quickbuy_shipping_calc ul#shipping_method li input:focus ~ label:before,
.popup_quickbuy_shipping_calc ul#shipping_method li input:focus ~ label:before {
    box-shadow: 0 0 0 3px rgba(253, 110, 29, 0.2);
}


/* ==========================================================================
   Coupon Section
   ========================================================================== */

.customer_coupon_field {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--devvn-spacing-sm);
}

.popup-customer-info-item-2-3 {
    flex: 1;
    flex-shrink: 1;
    flex-basis: auto !important;
}

.popup-customer-info-item-2-1 {
    margin-left: var(--devvn-spacing-md);
}

.customer_coupon_field button.apply_coupon {
    font-size: var(--devvn-font-size-xs);
    padding: 0 var(--devvn-spacing-md);
    border: 1px solid var(--devvn-primary);
    width: 100%;
    height: var(--devvn-input-height);
    line-height: 24px;
    min-height: inherit;
    box-shadow: none;
    margin: 0;
    font-family: var(--devvn-font-family-alt);
    background: var(--devvn-primary);
    color: #fff;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--devvn-radius-sm);
    transition: background-color var(--devvn-transition-fast), border-color var(--devvn-transition-fast);
}

.customer_coupon_field button.apply_coupon:hover {
    background: var(--devvn-primary-hover);
    border-color: var(--devvn-primary-hover);
}

.customer_coupon_field button.apply_coupon:focus {
    outline: 2px solid var(--devvn-primary);
    outline-offset: 2px;
}

.customer_coupon_field_mess,
.quickbuy_coupon_mess_amout {
    display: none;
}

body .quickbuy_coupon_mess ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body .quickbuy_coupon_mess ul li {
    margin: 0;
    padding: 0;
    font-size: var(--devvn-font-size-xs);
}


/* ==========================================================================
   Inline Form Variant
   ========================================================================== */

.devvn-popup-quickbuy.devvn-form-quickbuy-inline {
    display: block;
}

.devvn-popup-quickbuy.devvn-form-quickbuy-inline .devvn-popup-inner {
    width: 100%;
    box-shadow: none !important;
    border: 1px solid var(--devvn-border-light);
    border-radius: 3px;
}

/* ==========================================================================
   Sticky Add to Cart Integration
   ========================================================================== */

.devvn-popup-inner .sticky-add-to-cart--active {
    position: relative;
    display: block;
    padding: 0;
    border-top: 0;
}

.devvn-popup-inner .sticky-add-to-cart--active .sticky-add-to-cart__product {
    display: none !important;
}

.devvn-popup-inner .sticky-add-to-cart-wrapper {
    height: auto !important;
}

/* ==========================================================================
   Le Van Toan Theme Compatibility
   ========================================================================== */

.le-van-toan .mfp-container {
    padding: var(--devvn-spacing-md);
}

/* ==========================================================================
   Responsive Styles - Tablet and Mobile
   ========================================================================== */

@media screen and (max-width: 800px) and (orientation: landscape),
       screen and (max-height: 300px) {
    .mfp-img-mobile .mfp-image-holder {
        padding-left: 0;
        padding-right: 0;
    }
    
    .mfp-img-mobile img.mfp-img {
        padding: 0;
    }
    
    .mfp-img-mobile .mfp-figure:after {
        top: 0;
        bottom: 0;
    }
    
    .mfp-img-mobile .mfp-figure small {
        display: inline;
        margin-left: 5px;
    }

    
    .mfp-img-mobile .mfp-bottom-bar {
        background: rgba(0, 0, 0, 0.6);
        bottom: 0;
        margin: 0;
        top: auto;
        padding: 3px 5px;
        position: fixed;
        box-sizing: border-box;
    }
    
    .mfp-img-mobile .mfp-bottom-bar:empty {
        padding: 0;
    }
    
    .mfp-img-mobile .mfp-counter {
        right: 5px;
        top: 3px;
    }
    
    .mfp-img-mobile .mfp-close {
        top: 0;
        right: 0;
        width: 35px;
        height: 35px;
        line-height: 35px;
        background: rgba(0, 0, 0, 0.6);
        position: fixed;
        text-align: center;
        padding: 0;
    }
}

@media all and (max-width: 900px) {
    .mfp-arrow {
        transform: scale(0.75);
    }
    
    .mfp-arrow-left {
        transform-origin: 0;
    }
    
    .mfp-arrow-right {
        transform-origin: 100%;
    }
    
    .mfp-container {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* Main popup responsive breakpoint */
@media (max-width: 750px) {
    .devvn-popup-content-left,
    .devvn-popup-content-right {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
    
    .devvn-popup-content-left.popup_quickbuy_hidden_mobile {
        display: none !important;
    }
    
    .devvn-popup-content-left {
        margin-bottom: var(--devvn-spacing-md);
    }
    
    .devvn-popup-inner {
        max-width: 100%;
        margin: var(--devvn-spacing-md);
        border-radius: var(--devvn-radius-lg);
    }
    
    .devvn-popup-content {
        padding: var(--devvn-spacing-md);
    }
    
    .devvn-popup-content-right .popup-customer-info {
        padding: var(--devvn-spacing-md);
    }
    
    .devvn-success-actions {
        flex-direction: column;
    }
    
    .devvn-success-btn {
        width: 100%;
        text-align: center;
    }
}


/* Small mobile devices */
@media (max-width: 480px) {
    :root {
        --devvn-popup-title-height: 44px;
        --devvn-font-size-md: 14px;
        --devvn-font-size-lg: 16px;
    }
    
    .devvn-popup-title {
        padding-left: var(--devvn-spacing-md);
        padding-right: 44px;
        font-size: var(--devvn-font-size-sm);
    }
    
    .devvn-popup-close {
        width: 28px;
        height: 28px;
        right: var(--devvn-spacing-sm);
    }
    
    .devvn-popup-content {
        padding: var(--devvn-spacing-sm);
    }
    
    .devvn-popup-prod {
        flex-direction: row;
        padding: var(--devvn-spacing-sm);
    }
    
    .devvn-popup-img {
        width: 70px;
        height: 70px;
    }
    
    span.devvn_title {
        font-size: var(--devvn-font-size-sm);
        -webkit-line-clamp: 2;
    }
    
    span.devvn_price {
        font-size: var(--devvn-font-size-md);
    }
    
    .devvn-popup-content-right .popup-customer-info {
        padding: var(--devvn-spacing-sm);
    }
    
    .popup-customer-info-title {
        font-size: var(--devvn-font-size-sm);
    }
    
    .popup-customer-info-title::before {
        height: 14px;
        width: 3px;
    }
    
    .popup-customer-info-item-2 {
        width: 100%;
        padding-right: 0 !important;
        padding-left: 0 !important;
        margin-bottom: var(--devvn-spacing-sm);
    }
    
    .popup-customer-info-item-13,
    .popup-customer-info-item-23 {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
        margin-bottom: var(--devvn-spacing-sm);
    }
    
    [class*="popup-customer-info-item-3-"] {
        width: 100%;
        padding-right: 0;
        margin-bottom: var(--devvn-spacing-sm);
    }
    
    body .popup-customer-info-group input,
    body .popup-customer-info-group select,
    body .popup-customer-info-group textarea {
        height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .popup-customer-info-group .devvn-order-btn {
        height: 52px;
        font-size: var(--devvn-font-size-md);
    }
    
    .customer_coupon_field {
        flex-wrap: wrap;
    }
    
    .popup-customer-info-item-2-1 {
        margin-left: 0;
        margin-top: var(--devvn-spacing-sm);
        width: 100%;
    }
    
    /* Success state mobile */
    .devvn-success-icon {
        width: 60px;
        height: 60px;
    }
    
    .devvn-success-icon::after {
        width: 22px;
        height: 11px;
        border-width: 3px;
    }
    
    .devvn-success-title {
        font-size: var(--devvn-font-size-lg);
    }
    
    .devvn-success-details,
    .devvn-success-next-steps {
        padding: var(--devvn-spacing-sm);
    }
}


/* Very small devices (320px) */
@media (max-width: 360px) {
    .devvn-popup-inner {
        margin: var(--devvn-spacing-sm);
    }
    
    .popup-customer-info-radio label ~ label {
        margin-left: var(--devvn-spacing-md);
    }
    
    a.devvn_buy_now_style {
        font-size: var(--devvn-font-size-md);
        padding: 8px 0;
    }
}

/* ==========================================================================
   High Contrast / Accessibility
   ========================================================================== */

/* Screen reader only text - visually hidden but accessible */
.screen-reader-text,
.devvn-popup-quickbuy .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus,
.devvn-popup-quickbuy .screen-reader-text:focus {
    background-color: var(--devvn-bg);
    border-radius: var(--devvn-radius-sm);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--devvn-text);
    display: block;
    font-size: var(--devvn-font-size-sm);
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: var(--devvn-spacing-md);
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link for keyboard navigation */
.devvn-skip-link {
    left: -9999px;
    position: absolute;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
}

.devvn-skip-link:focus,
.devvn-skip-link:active {
    color: var(--devvn-text);
    background-color: var(--devvn-bg);
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    overflow: visible;
    margin: var(--devvn-spacing-md);
    padding: var(--devvn-spacing-md);
    border-radius: var(--devvn-radius-md);
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2);
    text-align: center;
    text-decoration: none;
    z-index: 100000;
}

/* ARIA live region for error announcements */
.devvn-error-announcer,
.popup_error_container[aria-live] {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Visible error container */
.popup_error_container {
    margin-top: var(--devvn-spacing-sm);
}

.popup_error_container:not(:empty) {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--devvn-radius-md);
    padding: var(--devvn-spacing-sm) var(--devvn-spacing-md);
}

.popup_error_container label.error {
    display: flex !important;
    align-items: center;
    gap: var(--devvn-spacing-xs);
    font-weight: 500;
    color: var(--devvn-error);
    font-size: var(--devvn-font-size-xs);
    margin: var(--devvn-spacing-xs) 0;
}

.popup_error_container label.error::before {
    content: '';
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Focus styles for all interactive elements */
.devvn-popup-quickbuy button:focus,
.devvn-popup-quickbuy input:focus,
.devvn-popup-quickbuy select:focus,
.devvn-popup-quickbuy textarea:focus,
.devvn-popup-quickbuy a:focus {
    outline: 2px solid var(--devvn-primary);
    outline-offset: 2px;
}

/* Remove default outline when custom focus is applied */
.devvn-popup-quickbuy button:focus:not(:focus-visible),
.devvn-popup-quickbuy input:focus:not(:focus-visible),
.devvn-popup-quickbuy select:focus:not(:focus-visible),
.devvn-popup-quickbuy textarea:focus:not(:focus-visible),
.devvn-popup-quickbuy a:focus:not(:focus-visible) {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.devvn-popup-quickbuy :focus-visible {
    outline: 2px solid var(--devvn-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .devvn-popup,
    .mfp-bg,
    .mfp-wrap {
        display: none !important;
    }
}