/* Modal Styles */
.dpd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dpd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.dpd-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1000000;
}

.dpd-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.dpd-modal-header h3 {
    margin: 0;
    color: #333;
}

.dpd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dpd-modal-close:hover {
    color: #333;
}

.dpd-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.dpd-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Search Box */
.dpd-search-box {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.dpd-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.dpd-search-fields p {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.dpd-search-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dpd-search-fields input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dpd-search-fields input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Modal Main Layout */
.dpd-modal-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .dpd-modal-main {
        grid-template-columns: 1fr;
    }
}

.dpd-map-section {
    min-height: 400px;
}

.dpd-list-section {
    min-height: 400px;
}

/* Points List */
#dpd-points-container {
    padding-right: 10px;
}

.dpd-point-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
}

.dpd-point-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dpd-point-item h4 {
    margin: 0 0 10px 0;
    color: #2271b1;
    font-size: 16px;
}

.dpd-point-item p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.dpd-point-item .point-hours {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.dpd-point-item .point-availability {
    color: #46b450;
    font-weight: 600;
}

.dpd-point-item .select-point-btn {
    margin-top: 10px;
    width: 100%;
}

/* Loading State */
#dpd-loading .spinner {
    margin: 0 auto 15px;
    float: none;
}

/* Error State */
#dpd-error {
    margin: 15px 0;
    padding: 15px;
    border-radius: 4px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Body class for modal open */
body.dpd-modal-open {
    overflow: hidden;
}

/* Checkout Styles */
.dpd-pickup-point-selector {
    margin: 15px 0;
    padding: 0;
}

.dpd-open-modal {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.dpd-open-modal:hover {
    background: #135e96;
}

.dpd-selected-point-info {
    padding: 15px;
    background: #f0f9ff;
    border: 1px solid #b3e0ff;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.dpd-selected-point-info strong {
    color: #2271b1;
    margin-bottom: 5px;
    display: block;
}

/* Leaflet Popup Customization */
.leaflet-popup-content {
    min-width: 200px;
}

.leaflet-popup-content button.button {
    margin-top: 10px;
    width: 100%;
    background: #2271b1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.leaflet-popup-content button.button:hover {
    background: #135e96;
}