.agenwebsite-hide {
    display: none !important;
}

#agenwebsite_billing_city_field .optional {
    display: none;
}

.wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city .select2-container {
    border: 0;
    font-size: 1em !important;
    padding: 1.5em .5em 0;
    margin: 0;
}

.wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city .select2-container--default.select2-container--focus .select2-selection--multiple,
.wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city .select2-container .select2-dropdown, .wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city .select2-container .select2-selection{
    border: 0;
}

.wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city {
    border: 1px solid hsla(0,0%,7%,.8);
    border-radius: 4px;
    flex: 0 0 100% !important;
    padding-bottom: 5px;
}

.wc-block-components-agenwebsite_shipping_city-form__agenwebsite_shipping_city .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
}

.agenwebsite-warning-message {
    background: #fef5f5;
    border: 1px solid #e74c3c;
    color: #721c24;
    padding: 1em;
    margin: 1em 0;
    border-radius: 2px;
}

.agenwebsite-warning-message a {
    color: blue;
    text-decoration: underline;
}

/* =============================================
   City Search Popup Styles - Theme-Proof
   Using specific selectors to prevent theme overrides
   ============================================= */

/* Root overlay - highest specificity with !important for critical styles */
#aw-city-popup-overlay.aw-city-popup-overlay {
    all: initial !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(44, 62, 80, 0.5) !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    display: block !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Main popup container */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup {
    all: initial !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #d1d8dd !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    max-width: 500px !important;
    width: 90% !important;
    height: 70vh !important;
    max-height: 600px !important;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000000 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    overflow: hidden !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay.show .aw-city-popup {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

/* Popup header */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-header {
    all: initial !important;
    display: block !important;
    padding: 20px 20px 15px !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: relative !important;
    flex: none !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* Popup title */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-title {
    all: initial !important;
    display: block !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
}

/* Close button */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-close {
    all: initial !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 32px !important;
    height: 32px !important;
    background: #f3f4f6 !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    padding: 0 !important;
    line-height: 32px !important;
    text-align: center !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-close:hover {
    background: #e5e7eb !important;
    color: #1f2937 !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-close:focus {
    outline: 2px solid #4a90e2 !important;
    outline-offset: 2px !important;
}

/* Search input */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-search-input {
    all: initial !important;
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-search-input:focus {
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15) !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-search-input::placeholder {
    color: #9ca3af !important;
}

/* Popup body */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-body {
    all: initial !important;
    display: block !important;
    padding: 0 !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* Results list */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-results {
    all: initial !important;
    display: block !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
}

/* Result item */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-item {
    all: initial !important;
    display: block !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-item:hover {
    background-color: #f9fafb !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-item:last-child {
    border-bottom: none !important;
}

/* Result text */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-text {
    all: initial !important;
    display: block !important;
    font-size: 14px !important;
    color: #374151 !important;
    line-height: 1.5 !important;
    font-family: inherit !important;
}

/* Loading state */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-loading {
    all: initial !important;
    display: block !important;
    text-align: center !important;
    padding: 40px 20px !important;
    color: #6b7280 !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-loading-spinner {
    all: initial !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e5e7eb !important;
    border-top-color: #4a90e2 !important;
    border-radius: 50% !important;
    animation: aw-city-spin 0.8s linear infinite !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

@keyframes aw-city-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No results state */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-no-results {
    all: initial !important;
    display: block !important;
    text-align: center !important;
    padding: 40px 20px !important;
    color: #6b7280 !important;
    font-style: italic !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

/* Input trigger styles */
.aw-city-input-trigger {
    cursor: pointer !important;
    position: relative !important;
}

.aw-city-input-trigger:after {
    content: '🔍' !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
}

/* Mobile Compatibility - Theme-Proof */
@media (max-width: 768px) {
    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup {
        width: 95% !important;
        height: 80vh !important;
        max-height: none !important;
        top: 10vh !important;
        transform: translateX(-50%) scale(0.9) !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay.show .aw-city-popup {
        transform: translateX(-50%) scale(1) !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-header {
        padding: 15px 15px 12px !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-title {
        font-size: 16px !important;
        margin-bottom: 10px !important;
        padding-right: 30px !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-search-input {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 10px 14px !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-item {
        padding: 12px 15px !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-result-text {
        font-size: 13px !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-close {
        top: 12px !important;
        right: 12px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 18px !important;
        line-height: 28px !important;
    }
}

@media (max-width: 480px) {
    #aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        border: none !important;
    }

    #aw-city-popup-overlay.aw-city-popup-overlay.show .aw-city-popup {
        transform: none !important;
    }
}

/* =============================================
   Cart Page City Popup Field Styles - Theme-Proof
   ============================================= */
.aw-cart-city-field-wrapper {
    margin-bottom: 15px !important;
    padding: 15px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

.aw-cart-city-field-wrapper label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 14px !important;
}

.aw-cart-city-field-wrapper .aw-cart-city-input {
    width: 100% !important;
    padding: 12px 40px 12px 15px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    color: #1f2937 !important;
    line-height: 1.5 !important;
}

.aw-cart-city-field-wrapper .aw-cart-city-input:hover {
    border-color: #9ca3af !important;
}

.aw-cart-city-field-wrapper .aw-cart-city-input:focus {
    border-color: #4a90e2 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15) !important;
}

.aw-cart-city-field-wrapper .aw-cart-city-input::placeholder {
    color: #9ca3af !important;
}

/* Cart City Input Trigger Icon */
.aw-cart-city-field-wrapper .aw-cart-city-input.aw-city-input-trigger {
    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='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

/* Mobile adjustments for cart city field */
@media (max-width: 768px) {
    .aw-cart-city-field-wrapper {
        padding: 12px !important;
    }

    .aw-cart-city-field-wrapper .aw-cart-city-input {
        padding: 10px 35px 10px 12px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* =============================================
   Popup Search Position Variants - Theme-Proof
   ============================================= */
#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-header.aw-search-bottom {
    padding-bottom: 15px !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-popup-header.aw-search-bottom + .aw-city-popup-body {
    position: relative !important;
    padding-top: 0 !important;
    padding-bottom: 65px !important;
}

#aw-city-popup-overlay.aw-city-popup-overlay .aw-city-search-input.aw-search-in-body {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 15px 20px !important;
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* =============================================
   Shipping Display Enhancement Styles
   ============================================= */
tr.woocommerce-shipping-totals.shipping td {
    padding: 0;
}
/* Hide WooCommerce default Shipping header */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > th,
.woocommerce table.shop_table tr.shipping > th,
tr.woocommerce-shipping-totals > th:first-child {
    display: none !important;
}

/* Make shipping td full width when th is hidden */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td,
.woocommerce table.shop_table tr.shipping > td,
tr.woocommerce-shipping-totals > td {
    width: 100% !important;
    padding-left: 0 !important;
}

/* Shipping Label Header and Footer Rows */
.aw-shipping-header-row,
.aw-shipping-footer-row {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.aw-shipping-header-row input[type="radio"],
.aw-shipping-footer-row input[type="radio"] {
    display: none !important;
}

.aw-shipping-label-header {
    background: #f7f9fc;
    color: #2c3e50;
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e1e8ed;
    border-bottom: 2px solid #4a90e2;
}

.aw-shipping-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

.aw-shipping-subtitle {
    font-size: 12px;
    color: #7f8c8d;
}

.aw-shipping-label-footer {
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 0 0 4px 4px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.aw-shipping-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 13px;
}

.aw-shipping-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: #6c757d;
}

/* Ensure proper spacing when header/footer are present */
.woocommerce-shipping-methods.aw-enhanced {
    margin: 0;
    padding: 0;
}

/* Style regular list items in flat mode when header/footer present */
.woocommerce-shipping-methods.aw-enhanced > li:not(.aw-shipping-header-row):not(.aw-shipping-footer-row):not(.aw-courier-group):not(.aw-speed-group):not(.aw-price-group) {
    background: #fff;
    padding: 12px 20px;
    margin: 0;
    border-left: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.woocommerce-shipping-methods.aw-enhanced > li:not(.aw-shipping-header-row):not(.aw-shipping-footer-row):not(.aw-courier-group):not(.aw-speed-group):not(.aw-price-group):first-of-type {
    border-top: 1px solid #e9ecef;
}

.woocommerce-shipping-methods.aw-enhanced > li:not(.aw-shipping-header-row):not(.aw-shipping-footer-row):hover {
    background: #fafbfc;
}

/* Courier Group Styles */
.aw-courier-group {
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.aw-courier-group:hover {
    border-color: #d1d8dd;
}

.aw-courier-group-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    user-select: none;
}

.aw-courier-group-header:hover {
    background: #f1f3f5;
}

.aw-courier-group-header.active {
    background: #fff;
    color: #2c3e50;
    border-bottom: 2px solid #4a90e2;
    font-weight: 600;
}

.aw-courier-group-header.has-selected {
    background: #f0f6ff;
    border-left: 4px solid #4a90e2;
}

.aw-courier-name {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.aw-courier-count {
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
    opacity: 0.8;
}

.aw-courier-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    margin-left: auto;
}

.aw-courier-toggle:before {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0);
    transition: transform 0.3s ease;
    font-size: 12px;
}

.aw-courier-group-header:not(.active) .aw-courier-toggle:before {
    transform: translateY(-50%) rotate(-90deg);
}

/* Services within courier group */
.aw-courier-services {
    padding: 10px 15px;
    background: #fafbfc;
    list-style: none;
    margin: 0;
}

.aw-courier-services li {
    padding: 12px 15px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.aw-courier-services li:hover {
    background: #fafbfc;
    border-color: #4a90e2;
    transform: none;
}

.aw-courier-services li.aw-cheapest-in-group {
    background: #fafafa;
    border-left: 3px solid #4a90e2;
}

/* Badge Styles */
.aw-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
}

.aw-badge-cheap {
    background: #f0f4f7;
    color: #2c3e50;
    border: 1px solid #d1d8dd;
}

.aw-badge-best-price {
    background: #fef9f3;
    color: #856404;
    border: 1px solid #f39c12;
}

/* Speed Display Badges */
.aw-speed-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    vertical-align: middle;
}

.aw-speed-fastest {
    background: #fef5f5;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.aw-speed-fast {
    background: #fff6f5;
    color: #e67e22;
    border: 1px solid #e67e22;
}

.aw-speed-express {
    background: #f0f6ff;
    color: #3498db;
    border: 1px solid #3498db;
}

.aw-speed-regular {
    background: #f7f8f9;
    color: #7f8c8d;
    border: 1px solid #95a5a6;
}

/* Price Display Enhancements */
.aw-cheapest-overall {
    background: #fefefe !important;
    border: 2px solid #f39c12 !important;
    padding: 15px !important;
}

.aw-price-diff {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 6px;
    background: #fef5f5;
    color: #e74c3c;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
}

/* Delivery Time Categories */
.aw-instant {
    border-left: 4px solid #9b59b6;
    background: #fafafa;
}

.aw-same-day {
    border-left: 4px solid #ff4757;
}

.aw-next-day {
    border-left: 4px solid #ff6348;
}

.aw-express {
    border-left: 4px solid #3498db;
}

.aw-regular {
    border-left: 4px solid #95a5a6;
}

.aw-kargo {
    border-left: 4px solid #8B4513;
    background: #fafafa;
}

/* Kargo speed badge */
.aw-speed-kargo {
    background: #fef9f5;
    color: #8B4513;
    border: 1px solid #8B4513;
}

/* Removed pulse animation for minimalist design */

/* Responsive Design */
@media (max-width: 768px) {
    .aw-courier-group-header {
        padding: 12px 15px;
        font-size: 14px;
    }

    .aw-courier-name {
        font-size: 14px;
    }

    .aw-courier-count {
        font-size: 12px;
    }

    .aw-courier-services li {
        padding: 10px 12px;
    }

    .aw-badge,
    .aw-speed-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Enhanced hover effects */
.woocommerce-shipping-methods.aw-enhanced li:hover {
    background-color: #fafbfc;
}

/* Ensure radio buttons are properly aligned */
.aw-courier-services input[type="radio"] {
    margin-right: 10px;
    vertical-align: middle;
}

/* Make labels more clickable */
.aw-courier-services label {
    display: block;
    cursor: pointer;
    width: 100%;
}

/* Selected shipping method highlight */
.aw-courier-services li:has(input:checked) {
    background: #f0f6ff;
    border-color: #4a90e2;
    box-shadow: none;
}

/* Speed Group Styles - Similar to Courier Groups */
.aw-speed-group {
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.3s ease;
    border-left: 0;
    border-right: 0;
}

.aw-speed-group:hover {
    border-color: #d1d8dd;
}

.aw-speed-group-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    user-select: none;
}

.aw-speed-group-header:hover {
    background: #f1f3f5;
}

.aw-speed-group-header.active {
    background: #fff;
    color: #2c3e50;
    border-bottom: 2px solid #4a90e2;
    font-weight: 600;
}

.aw-speed-group-header.has-selected {
    background: #f0f6ff;
    border-left: 4px solid #4a90e2;
}

.aw-speed-name {
    font-size: 16px;
    font-weight: bold;
}

.aw-speed-count {
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
    opacity: 0.8;
}

.aw-speed-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    margin-left: auto;
}

.aw-speed-toggle:before {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0);
    transition: transform 0.3s ease;
    font-size: 12px;
}

.aw-speed-group-header:not(.active) .aw-speed-toggle:before {
    transform: translateY(-50%) rotate(-90deg);
}

.aw-speed-services {
    padding: 10px 15px;
    background: #fafbfc;
    list-style: none;
    margin: 0;
}

.aw-speed-services li {
    padding: 12px 15px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.aw-speed-services li:hover {
    background: #fafbfc;
    border-color: #4a90e2;
    transform: none;
}

.aw-speed-services li:has(input:checked) {
    background: #f0f6ff;
    border-color: #4a90e2;
    box-shadow: none;
}

/* Price Group Styles */
.aw-price-group {
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.aw-price-group:hover {
    border-color: #d1d8dd;
}

.aw-price-group-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    user-select: none;
}

.aw-price-group-header:hover {
    background: #f1f3f5;
}

.aw-price-group-header.active {
    background: #fff;
    color: #2c3e50;
    border-bottom: 2px solid #4a90e2;
    font-weight: 600;
}

.aw-price-group-header.has-selected {
    background: #f0f6ff;
    border-left: 4px solid #4a90e2;
}

.aw-price-name {
    font-size: 16px;
    font-weight: bold;
}

.aw-price-count {
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
    opacity: 0.8;
}

.aw-price-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    margin-left: auto;
}

.aw-price-toggle:before {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0);
    transition: transform 0.3s ease;
    font-size: 12px;
}

.aw-price-group-header:not(.active) .aw-price-toggle:before {
    transform: translateY(-50%) rotate(-90deg);
}

.aw-price-services {
    padding: 10px 15px;
    background: #fafbfc;
    list-style: none;
    margin: 0;
}

.aw-price-services li {
    padding: 12px 15px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.aw-price-services li:hover {
    background: #fafbfc;
    border-color: #f39c12;
    transform: none;
}

.aw-price-services li:has(input:checked) {
    background: #fef9f3;
    border-color: #f39c12;
    box-shadow: none;
}

/* Responsive adjustments for new groups */
@media (max-width: 768px) {
    .aw-speed-group-header,
    .aw-price-group-header {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* Header and Footer responsive styles */
    .aw-shipping-label-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 12px 15px;
    }

    .aw-shipping-title {
        font-size: 14px;
    }

    .aw-shipping-subtitle {
        font-size: 11px;
    }

    .aw-shipping-label-footer {
        padding: 10px 15px;
    }

    .aw-shipping-info {
        font-size: 12px;
    }

    .aw-speed-name,
    .aw-price-name {
        font-size: 14px;
    }

    .aw-speed-count,
    .aw-price-count {
        font-size: 12px;
    }

    .aw-speed-services li,
    .aw-price-services li {
        padding: 10px 12px;
    }
}

/* =============================================
   Checkout Insurance Styles
   ============================================= */

/* Container wrapper */
.aw-checkout-insurance-wrapper {
    clear: both;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.aw-checkout-insurance-wrapper:hover {
    border-color: #d1d8dd;
}

/* Active state - when insurance is selected */
.aw-checkout-insurance-wrapper.insurance-active {
    background: #e8f5e9;
    border-color: #4caf50;
}

/* Optional mode specific styles */
.aw-checkout-insurance-wrapper.aw-insurance-optional {
    cursor: pointer;
}

.aw-checkout-insurance-wrapper.aw-insurance-optional:hover {
    background: #f0f4f8;
}

.aw-checkout-insurance-wrapper.aw-insurance-optional.insurance-active:hover {
    background: #dcedc8;
}

/* Insurance content area */
.aw-checkout-insurance-wrapper .aw-insurance-content {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Checkbox label styling */
.aw-checkout-insurance-wrapper .aw-insurance-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    margin: 0;
    width: 100%;
    user-select: none;
}

.aw-checkout-insurance-wrapper .aw-insurance-label:hover {
    color: #1a73e8;
}

/* Custom checkbox styling */
.aw-checkout-insurance-wrapper .aw-insurance-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.aw-checkout-insurance-wrapper .aw-insurance-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #d1d8dd;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aw-checkout-insurance-wrapper .aw-insurance-checkmark:after {
    content: '';
    display: none;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Checkbox checked state */
.aw-checkout-insurance-wrapper .aw-insurance-checkbox:checked ~ .aw-insurance-checkmark {
    background: #4caf50;
    border-color: #4caf50;
}

.aw-checkout-insurance-wrapper .aw-insurance-checkbox:checked ~ .aw-insurance-checkmark:after {
    display: block;
}

/* Checkbox hover state */
.aw-checkout-insurance-wrapper .aw-insurance-label:hover .aw-insurance-checkmark {
    border-color: #4caf50;
}

/* Insurance text */
.aw-checkout-insurance-wrapper .aw-insurance-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

/* Forced mode specific styles */
.aw-checkout-insurance-wrapper.aw-insurance-forced {
    background: #e8f5e9;
    border-color: #4caf50;
    border-width: 2px;
}

.aw-checkout-insurance-wrapper.aw-insurance-forced .aw-insurance-message {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #2e7d32;
}

.aw-checkout-insurance-wrapper.aw-insurance-forced .aw-insurance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 12px;
    color: white;
    flex-shrink: 0;
}

.aw-checkout-insurance-wrapper.aw-insurance-forced .aw-insurance-icon svg {
    width: 14px;
    height: 14px;
}

/* Insurance badge (for forced mode) */
.aw-checkout-insurance-wrapper .aw-insurance-badge {
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-left: 15px;
}

/* Loading state */
.aw-checkout-insurance-wrapper.aw-insurance-loading {
    opacity: 0.7;
    pointer-events: none;
}

.aw-checkout-insurance-wrapper.aw-insurance-loading:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: aw-insurance-spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes aw-insurance-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .aw-checkout-insurance-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }

    .aw-checkout-insurance-wrapper .aw-insurance-content {
        width: 100%;
        margin-bottom: 10px;
    }

    .aw-checkout-insurance-wrapper .aw-insurance-badge {
        margin-left: 0;
        margin-top: 5px;
    }

    .aw-checkout-insurance-wrapper .aw-insurance-text {
        font-size: 13px;
    }

    .aw-checkout-insurance-wrapper.aw-insurance-forced .aw-insurance-message {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .aw-checkout-insurance-wrapper {
        padding: 12px 14px;
    }

    .aw-checkout-insurance-wrapper .aw-insurance-checkmark {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .aw-checkout-insurance-wrapper .aw-insurance-text {
        font-size: 12px;
    }
}