/**
 * DIGIQAL ACS - SmartPoint Checkout Styles
 * Modern Design 2026
 */

:root {
    --acs-primary: #e30613;
    --acs-primary-dark: #b8050f;
    --acs-primary-light: #ff1a2b;
    --acs-success: #10b981;
    --acs-success-light: #d1fae5;
    --acs-warning: #f59e0b;
    --acs-gray-50: #f9fafb;
    --acs-gray-100: #f3f4f6;
    --acs-gray-200: #e5e7eb;
    --acs-gray-300: #d1d5db;
    --acs-gray-400: #9ca3af;
    --acs-gray-500: #6b7280;
    --acs-gray-600: #4b5563;
    --acs-gray-700: #374151;
    --acs-gray-800: #1f2937;
    --acs-gray-900: #111827;
    --acs-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --acs-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --acs-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --acs-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --acs-radius: 12px;
    --acs-radius-lg: 16px;
    --acs-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Main Container - Card Style
   ========================================== */
#digiqal-acs-smartpoint-container {
    position: relative;
    border-radius: var(--acs-radius);
    margin: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--acs-gray-200);
    box-shadow: var(--acs-shadow-sm);
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}

@media (max-width: 600px) {
    #digiqal-acs-smartpoint-container {
        padding: 12px;
        overflow: visible !important;
    }

    /* Fix WooCommerce checkout table overflow on mobile */
    .woocommerce-checkout-review-order-table,
    #order_review,
    .shop_table,
    .woocommerce table.shop_table,
    .thegem-te-checkout-order #order_review {
        overflow: visible !important;
    }

    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table tr,
    #order_review td,
    #order_review tr,
    .shop_table td,
    .shop_table tr {
        overflow: visible !important;
    }

    .digiqal-acs-smartpoint-row,
    .digiqal-acs-smartpoint-row td {
        overflow: visible !important;
    }

    /* CRITICAL: Allow page scroll on mobile when SmartPoint is selected */
    body.woocommerce-checkout,
    html.woocommerce-checkout,
    .woocommerce-checkout #page,
    .woocommerce-checkout .site-content,
    .woocommerce-checkout .content-area,
    .woocommerce-checkout main,
    .woocommerce-checkout article,
    .thegem-te-checkout,
    .thegem-te-checkout-order,
    #primary,
    #main,
    .site-main {
        overflow: visible !important;
        overflow-y: visible !important;
        height: auto !important;
        min-height: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Fix TheGem specific containers */
    .thegem-te-checkout .checkout-content,
    .thegem-template-checkout,
    .checkout.woocommerce-checkout,
    form.checkout {
        overflow: visible !important;
        height: auto !important;
    }
}

/* Initially hidden - shown by JS when SmartPoint shipping is selected */
.digiqal-acs-smartpoint-row {
    display: none;
}

/* Full width for classic checkout table row */
.digiqal-acs-smartpoint-row td {
    padding: 12px 0 !important;
    background: transparent !important;
}

/* Make the row span full width in WooCommerce checkout table */
.woocommerce-checkout-review-order-table .digiqal-acs-smartpoint-row td,
#order_review .digiqal-acs-smartpoint-row td,
.shop_table .digiqal-acs-smartpoint-row td {
    padding: 12px 0 !important;
}

#digiqal-acs-smartpoint-container .acs-smartpoint-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--acs-gray-800);
}

#digiqal-acs-smartpoint-container .acs-smartpoint-header::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--acs-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

#digiqal-acs-smartpoint-container .acs-smartpoint-header span {
    flex: 1;
}

#digiqal-acs-smartpoint-container .acs-smartpoint-header .selected-type-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: auto;
}

.digiqal-acs-smartpoint-block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.digiqal-acs-smartpoint-block-header h3 {
    flex: 1;
    margin: 0;
}

.digiqal-acs-smartpoint-block-header .selected-type-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

#digiqal-acs-smartpoint-container .description {
    margin: 12px 0 0 !important;
    font-size: 12px;
    color: var(--acs-gray-500);
    text-align: center;
}

/* ==========================================
   Selected Point Display - Modern Card
   ========================================== */
.smartpoint-selected {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 0;
    background: #fff;
    border: none;
    border-radius: var(--acs-radius);
    margin-top: 16px;
    margin-bottom: 0;
    transition: var(--acs-transition);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smartpoint-selected.has-selection {
    display: flex !important;
}

.smartpoint-selected .selected-type-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.smartpoint-selected .selected-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%);
    border-radius: var(--acs-radius);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

.smartpoint-selected .selected-icon .dashicons {
    color: #fff;
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.smartpoint-selected .selected-icon .acs-point-logo {
    width: 36px;
    height: auto;
    filter: brightness(0) invert(1);
}

.smartpoint-selected .selected-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.smartpoint-selected .selected-info strong,
.smartpoint-selected .selected-info strong#selected-name,
#digiqal-acs-smartpoint-container .smartpoint-selected .selected-info strong,
#smartpoint-selected .selected-info strong,
.woocommerce-checkout-payment-total td span .smartpoint-selected .selected-info strong,
#order_review .smartpoint-selected .selected-info strong,
.thegem-te-checkout-order #order_review .smartpoint-selected .selected-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827 !important;
    margin-bottom: 2px;
    text-align: left;
}

.smartpoint-selected .selected-info span,
.smartpoint-selected .selected-info span.selected-address,
.smartpoint-selected .selected-info .selected-address,
#digiqal-acs-smartpoint-container .smartpoint-selected .selected-info span,
#smartpoint-selected .selected-info span,
.woocommerce-checkout-payment-total td span .smartpoint-selected .selected-info span,
#order_review .smartpoint-selected .selected-info span,
.thegem-te-checkout-order #order_review .smartpoint-selected .selected-info span,
#order_review .digiqal-acs-smartpoint-row span,
.thegem-te-checkout-order #order_review .digiqal-acs-smartpoint-row span,
.woocommerce-checkout-payment-total td .digiqal-acs-smartpoint-row span {
    display: block;
    font-size: 13px;
    color: #6b7280 !important;
    text-align: left;
}

/* Override theme styles for selected address - high specificity */
.woocommerce-checkout-payment-total td span.selected-address,
.thegem-te-checkout-order span.selected-address,
.elementor-element span.selected-address,
#order_review span.selected-address,
.digiqal-acs-smartpoint-row span.selected-address,
#digiqal-acs-smartpoint-container span.selected-address,
span.selected-address {
    color: #6b7280 !important;
}

.smartpoint-selected .button,
.smartpoint-selected .button-link,
.smartpoint-selected .smartpoint-change-btn,
#change-smartpoint {
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--acs-transition);
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.3);
}

.smartpoint-selected .button:hover,
.smartpoint-selected .smartpoint-change-btn:hover,
#change-smartpoint:hover {
    background: linear-gradient(135deg, var(--acs-primary-dark) 0%, #8a040c 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}

/* ==========================================
   Modal Overlay - Glass Effect
   ========================================== */
.smartpoint-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.2s ease-out;
}

.smartpoint-modal {
    isolation: isolate;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.smartpoint-modal-open {
    overflow: hidden !important;
}

body.smartpoint-modal-open header,
body.smartpoint-modal-open .site-header,
body.smartpoint-modal-open #masthead,
body.smartpoint-modal-open .sticky-header,
body.smartpoint-modal-open nav.navbar,
body.smartpoint-modal-open .mobile-menu,
body.smartpoint-modal-open .main-navigation,
body.smartpoint-modal-open .elementor-sticky,
body.smartpoint-modal-open [class*="sticky"],
body.smartpoint-modal-open [class*="fixed-header"] {
    z-index: 1 !important;
}

/* Override TheGem loading overlays */
body.smartpoint-modal-open .page-preloader,
body.smartpoint-modal-open .preloader,
body.smartpoint-modal-open .thegem-preloader,
body.smartpoint-modal-open [class*="preloader"],
body.smartpoint-modal-open [class*="loader"]:not(.smartpoint-loading) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure modal content is always visible */
.smartpoint-modal-content,
.smartpoint-modal-content *:not(.smartpoint-loading):not(.smartpoint-loading *) {
    visibility: visible !important;
    opacity: 1 !important;
}

.smartpoint-modal-content {
    background: #fff !important;
    border-radius: var(--acs-radius-lg);
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--acs-shadow-xl);
    position: relative;
    z-index: 2147483647;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Modal Header - Modern Gradient
   ========================================== */
.smartpoint-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%);
    color: #fff;
    position: relative;
    z-index: 2147483647;
}

.smartpoint-modal-header .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.smartpoint-modal-header .acs-header-logo {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
}

.smartpoint-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.3px;
}

.smartpoint-modal-close {
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    color: #fff !important;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    border-radius: 8px;
    flex-shrink: 0;
    transition: var(--acs-transition);
}

.smartpoint-modal-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ==========================================
   Modal Body
   ========================================== */
.smartpoint-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    background: #f9fafb !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force all modal body children to be visible */
.smartpoint-modal-body * {
    visibility: visible !important;
    opacity: 1 !important;
}

.smartpoint-modal-body > * {
    display: block !important;
}

.smartpoint-modal-body > .smartpoint-search,
.smartpoint-modal-body > .smartpoint-filter {
    display: flex !important;
}

/* ==========================================
   Search Bar - Modern Input Group
   ========================================== */
.smartpoint-search {
    display: flex !important;
    gap: 10px;
    margin-bottom: 14px;
    visibility: visible !important;
    opacity: 1 !important;
}

.smartpoint-search input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--acs-gray-200);
    border-radius: var(--acs-radius);
    font-size: 15px;
    background: #fff;
    transition: var(--acs-transition);
}

.smartpoint-search input:focus {
    outline: none;
    border-color: var(--acs-primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.smartpoint-search input::placeholder {
    color: var(--acs-gray-400);
}

.smartpoint-search .button,
.smartpoint-search button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--acs-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--acs-transition);
    white-space: nowrap;
}

.smartpoint-search .button:hover,
.smartpoint-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

#smartpoint-location-btn {
    padding: 12px 14px;
    background: var(--acs-gray-800);
    color: #fff;
    border: none;
    border-radius: var(--acs-radius);
    transition: var(--acs-transition);
}

#smartpoint-location-btn:hover {
    background: var(--acs-gray-900);
    transform: translateY(-1px);
}

#smartpoint-location-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ==========================================
   Filter Tabs - Modern Pill Design
   ========================================== */
.smartpoint-filter {
    display: flex !important;
    gap: 8px;
    margin-bottom: 14px;
    padding: 4px;
    background: #fff;
    border-radius: var(--acs-radius);
    box-shadow: var(--acs-shadow-sm);
    visibility: visible !important;
    opacity: 1 !important;
}

.smartpoint-filter .filter-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--acs-gray-500);
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: var(--acs-transition);
    white-space: nowrap;
}

.smartpoint-filter .filter-tab:hover {
    background: var(--acs-gray-100);
    color: var(--acs-gray-700);
}

.smartpoint-filter .filter-tab.active {
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.3);
}

.smartpoint-filter .filter-tab .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.smartpoint-filter .filter-tab .filter-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: var(--acs-transition);
}

/* Active tab: make icon white */
.smartpoint-filter .filter-tab.active .filter-icon {
    filter: brightness(0) invert(1);
}

/* ==========================================
   Map Container
   ========================================== */
.smartpoint-map {
    height: 220px;
    border-radius: var(--acs-radius);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: var(--acs-shadow);
    border: 1px solid var(--acs-gray-200);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure Leaflet map renders correctly */
.smartpoint-map .leaflet-container {
    height: 100% !important;
    width: 100% !important;
    background: #e5e7eb !important;
}

/* ==========================================
   Points List
   ========================================== */
.smartpoint-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.smartpoint-list::-webkit-scrollbar {
    width: 6px;
}

.smartpoint-list::-webkit-scrollbar-track {
    background: var(--acs-gray-100);
    border-radius: 3px;
}

.smartpoint-list::-webkit-scrollbar-thumb {
    background: var(--acs-gray-300);
    border-radius: 3px;
}

.smartpoint-list::-webkit-scrollbar-thumb:hover {
    background: var(--acs-gray-400);
}

/* ==========================================
   Loading State - Skeleton
   ========================================== */
.smartpoint-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--acs-gray-500);
    font-size: 14px;
}

.smartpoint-loading::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--acs-gray-200);
    border-top-color: var(--acs-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Skeleton loading cards */
.smartpoint-skeleton {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: var(--acs-radius);
    margin-bottom: 8px;
}

.smartpoint-skeleton .skeleton-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(90deg, var(--acs-gray-200) 25%, var(--acs-gray-100) 50%, var(--acs-gray-200) 75%);
    background-size: 200% 100%;
    border-radius: 10px;
    margin-right: 12px;
    animation: shimmer 1.5s infinite;
}

.smartpoint-skeleton .skeleton-content {
    flex: 1;
}

.smartpoint-skeleton .skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, var(--acs-gray-200) 25%, var(--acs-gray-100) 50%, var(--acs-gray-200) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: shimmer 1.5s infinite;
}

.smartpoint-skeleton .skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   No Results - Friendly State
   ========================================== */
.smartpoint-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 2px dashed var(--acs-gray-200);
    border-radius: var(--acs-radius);
}

.smartpoint-no-results .no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.smartpoint-no-results p {
    margin: 0;
    font-size: 14px;
    color: var(--acs-gray-600);
    line-height: 1.5;
}

/* Spin animation for loading */
.dashicons.spin {
    animation: spin 1s linear infinite;
}

/* ==========================================
   SmartPoint Item - Modern Card
   ========================================== */
.smartpoint-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--acs-radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--acs-transition);
    box-shadow: var(--acs-shadow-sm);
}

.smartpoint-item:hover {
    border-color: var(--acs-primary);
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    transform: translateY(-2px);
    box-shadow: var(--acs-shadow);
}

.smartpoint-item.selected {
    border-color: var(--acs-success);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.smartpoint-item .item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--acs-gray-100);
    border-radius: 10px;
    margin-right: 14px;
    flex-shrink: 0;
    font-size: 22px;
    transition: var(--acs-transition);
}

.smartpoint-item .item-icon .item-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.smartpoint-item:hover .item-icon {
    background: #fee2e2;
    transform: scale(1.05);
}

.smartpoint-item.selected .item-icon {
    background: var(--acs-success-light);
}

/* Custom Map Markers */
.acs-marker-locker {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.acs-marker-store {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.smartpoint-item .item-info {
    flex: 1;
    min-width: 0;
}

.smartpoint-item .item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--acs-gray-900);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smartpoint-item .item-address {
    font-size: 12px;
    color: var(--acs-gray-500);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smartpoint-item .item-distance {
    font-size: 13px;
    color: var(--acs-gray-700);
    font-weight: 700;
    margin-right: 12px;
    padding: 4px 10px;
    background: var(--acs-gray-100);
    border-radius: 6px;
    white-space: nowrap;
}

.smartpoint-item .item-select {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--acs-transition);
}

.smartpoint-item .item-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

.smartpoint-item.selected .item-select {
    background: linear-gradient(135deg, var(--acs-success) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ==========================================
   Open Modal Button
   ========================================== */
#open-smartpoint-modal {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    box-sizing: border-box;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--acs-primary) 0%, var(--acs-primary-dark) 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--acs-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--acs-transition);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

#open-smartpoint-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.4);
}

#open-smartpoint-modal .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ==========================================
   Thank You Page
   ========================================== */
.digiqal-acs-smartpoint-thankyou {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid var(--acs-success);
    border-radius: var(--acs-radius);
    padding: 20px;
    margin: 20px 0;
}

.digiqal-acs-smartpoint-thankyou h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #065f46;
}

/* ==========================================
   Responsive - Mobile Full Screen
   ========================================== */
@media (max-width: 600px) {
    .smartpoint-modal {
        padding: 0;
        align-items: stretch;
    }

    .smartpoint-modal-content {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .smartpoint-modal-header {
        padding: 10px 14px;
        border-radius: 0;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .smartpoint-modal-header .acs-header-logo {
        height: 22px;
    }

    .smartpoint-modal-header h2 {
        font-size: 14px;
    }

    .smartpoint-modal-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .smartpoint-modal-body {
        padding: 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .smartpoint-search {
        flex-wrap: wrap;
        gap: 8px;
        flex-shrink: 0 !important;
        margin-bottom: 10px;
    }

    .smartpoint-search input {
        width: 100%;
        padding: 10px 14px;
        font-size: 15px;
        border-radius: 8px;
    }

    .smartpoint-search .button,
    .smartpoint-search button {
        flex: 1;
        padding: 10px;
        font-size: 13px;
        border-radius: 8px;
    }

    .smartpoint-filter {
        gap: 4px;
        padding: 3px;
        margin-bottom: 10px;
        flex-shrink: 0 !important;
        border-radius: 8px;
    }

    .smartpoint-filter .filter-tab {
        padding: 10px 8px;
        font-size: 13px;
        border-radius: 8px;
    }

    .smartpoint-map {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
        margin-bottom: 12px;
        flex-shrink: 0;
        border-radius: 10px;
    }

    .smartpoint-list {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .smartpoint-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .smartpoint-item .item-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-right: 12px;
        border-radius: 10px;
    }

    .smartpoint-item .item-name {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .smartpoint-item .item-address {
        font-size: 11px;
    }

    .smartpoint-item .item-distance {
        font-size: 11px;
        padding: 3px 8px;
        margin-right: 8px;
    }

    .smartpoint-item .item-select {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Selected in checkout - mobile (matching Geniki styles) */
    .smartpoint-selected {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        padding: 16px !important;
        border-radius: 10px !important;
        background: #fff !important;
        border: 1px solid var(--acs-gray-200) !important;
        overflow: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .smartpoint-selected.has-selection {
        display: flex !important;
    }

    .smartpoint-selected .selected-icon {
        display: none !important;
    }

    .smartpoint-selected .selected-info {
        flex: none !important;
        min-width: 0 !important;
    }

    .smartpoint-selected .selected-info strong,
    .smartpoint-selected .selected-info strong#selected-name {
        font-size: 14px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-wrap: break-word !important;
        line-height: 1.4 !important;
        margin-bottom: 6px !important;
    }

    .smartpoint-selected .selected-info span,
    .smartpoint-selected .selected-info span.selected-address,
    .smartpoint-selected .selected-info .selected-address {
        font-size: 13px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: block !important;
        word-wrap: break-word !important;
        line-height: 1.4 !important;
        color: #6b7280 !important;
    }

    .smartpoint-selected .selected-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .smartpoint-selected .button,
    .smartpoint-selected .smartpoint-change-btn,
    #change-smartpoint,
    #cancel-smartpoint {
        flex: 1 !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        text-align: center !important;
    }

    #open-smartpoint-modal {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        border-radius: 10px;
    }

    /* Ensure checkout container allows overflow on mobile */
    #digiqal-acs-smartpoint-container {
        overflow: visible !important;
        max-width: 100% !important;
    }
}

/* ==========================================
   Block Checkout Styles
   ========================================== */
.digiqal-acs-smartpoint-block-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--acs-gray-200);
    border-radius: var(--acs-radius);
    box-shadow: var(--acs-shadow-sm);
}

.digiqal-acs-smartpoint-block-wrapper .digiqal-acs-smartpoint-block-header {
    margin-bottom: 16px;
}

.digiqal-acs-smartpoint-block-wrapper .digiqal-acs-smartpoint-block-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--acs-gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.digiqal-acs-smartpoint-block-wrapper .digiqal-acs-smartpoint-block-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--acs-primary);
    border-radius: 2px;
}

.wp-block-woocommerce-checkout .smartpoint-modal,
.wc-block-checkout .smartpoint-modal {
    position: fixed !important;
    z-index: 999999 !important;
}

.digiqal-acs-smartpoint-block-wrapper #open-smartpoint-modal {
    width: 100%;
    justify-content: center;
}

.digiqal-acs-smartpoint-block-wrapper .smartpoint-selected {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .digiqal-acs-smartpoint-block-wrapper {
        margin: 16px 0;
        padding: 16px;
        border-radius: 10px;
    }

    .digiqal-acs-smartpoint-block-wrapper .digiqal-acs-smartpoint-block-header h3 {
        font-size: 14px;
    }
}

/* ==========================================
   Custom Map Markers
   ========================================== */
.smartpoint-marker {
    background: none !important;
    border: none !important;
}

.smartpoint-marker > div {
    transition: transform 0.2s ease;
}

.smartpoint-marker:hover > div {
    transform: scale(1.15);
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: var(--acs-shadow-lg) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 13px !important;
}

.leaflet-popup-content strong {
    color: var(--acs-gray-900);
    font-size: 14px;
}

/* ==========================================
   Disabled Locker Items (Weight Exceeded)
   ========================================== */
.smartpoint-item.smartpoint-disabled {
    opacity: 0.6;
    background: var(--acs-gray-100);
    border-color: var(--acs-gray-200);
    cursor: not-allowed;
}

.smartpoint-item.smartpoint-disabled:hover {
    transform: none;
    border-color: var(--acs-gray-200);
    background: var(--acs-gray-100);
    box-shadow: var(--acs-shadow-sm);
}

.smartpoint-item.smartpoint-disabled .item-icon {
    opacity: 0.5;
}

.smartpoint-item.smartpoint-disabled:hover .item-icon {
    transform: none;
    background: var(--acs-gray-100);
}

.smartpoint-item.smartpoint-disabled .item-disabled-reason {
    font-size: 11px;
    color: #dc2626;
    font-weight: 600;
    margin-top: 4px;
}

.smartpoint-item.smartpoint-disabled .item-select {
    background: var(--acs-gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

.smartpoint-item.smartpoint-disabled .item-select:hover {
    transform: none;
    box-shadow: none;
}

/* ==========================================
   Weight Warning Banner in Modal
   ========================================== */
.smartpoint-weight-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #f87171;
    border-radius: var(--acs-radius);
    color: #991b1b;
    font-size: 13px;
    font-weight: 500;
}

.smartpoint-weight-banner .dashicons {
    color: #dc2626;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==========================================
   Selected Actions (Change/Cancel buttons)
   ========================================== */
.smartpoint-selected .selected-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

#cancel-smartpoint,
.button-cancel {
    background: var(--acs-gray-200) !important;
    color: var(--acs-gray-700) !important;
    border: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--acs-transition);
    box-shadow: none !important;
}

#cancel-smartpoint:hover,
.button-cancel:hover {
    background: var(--acs-gray-300) !important;
    color: var(--acs-gray-800) !important;
}

/* Mobile selected actions - row layout, merged with main mobile block */

/* ==========================================
   Filter Weight Warning (under tabs)
   ========================================== */
.smartpoint-filter-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: var(--acs-radius);
    color: #92400e;
    font-size: 13px;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .smartpoint-filter-warning {
        padding: 10px 12px;
        font-size: 12px;
        margin-bottom: 10px;
        flex-shrink: 0 !important;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smartpoint-filter-warning .dashicons {
    color: #d97706;
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.smartpoint-filter-warning strong {
    color: #10b981;
    text-decoration: underline;
    cursor: pointer;
}
