/**
 * COL323 Shipping - Checkout Locker Picker Styles
 * v1.0.0
 */

/* Modal Overlay */
.col323-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.col323-modal-open {
    overflow: hidden;
}

/* Modal */
.col323-modal {
    position: relative;
    max-width: 960px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.col323-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.col323-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.col323-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.col323-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.col323-modal-body {
    padding: 0;
}

/* Search */
.col323-locker-search {
    padding: 12px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.col323-locker-search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.col323-locker-search-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Content Layout */
.col323-locker-content {
    display: flex;
    height: 500px;
}

.col323-map-container {
    flex: 1;
    min-width: 0;
}

#col323-locker-map {
    width: 100%;
    height: 100%;
}

.col323-locker-list {
    width: 320px;
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* List Items */
.col323-locker-list-item {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
}

.col323-locker-list-item:hover,
.col323-locker-list-item.col323-active {
    background: #fff;
}

.col323-locker-list-item.col323-recommended {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.col323-locker-list-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
}

.col323-locker-list-address {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.col323-locker-list-distance {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.col323-recommended-badge {
    display: inline-block;
    background: #22c55e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading / Message */
.col323-locker-list-loading,
.col323-locker-list-message {
    padding: 40px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

/* Map Popup */
.col323-popup {
    font-size: 13px;
    line-height: 1.5;
    min-width: 180px;
}

.col323-popup strong {
    font-size: 14px;
}

.col323-locker-select-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.col323-locker-select-btn:hover {
    background: #ea580c;
}

/* Locker Picker - Inline at Checkout (Classic + Blocks) */
.col323-locker-picker-wrap {
    margin-top: 8px;
    padding: 4px 0 4px 28px;
    clear: both;
}

/* WC Blocks: ensure the wrapper appears properly inside radio option */
.wc-block-components-radio-control__option .col323-locker-picker-wrap {
    padding-left: 0;
    margin-top: 4px;
}

.col323-locker-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 6px;
}

.col323-locker-btn:hover {
    background: #ea580c;
}

.col323-locker-selected {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 13px;
}

.col323-locker-icon {
    font-size: 16px;
}

/* Custom Marker */
.col323-marker {
    background: transparent !important;
    border: none !important;
}

/* Pulse animation for recommended marker */
@keyframes col323-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .col323-modal {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .col323-locker-content {
        flex-direction: column;
        height: auto;
    }

    .col323-map-container {
        height: 300px;
    }

    #col323-locker-map {
        height: 300px;
    }

    .col323-locker-list {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        max-height: 400px;
    }
}
