/**
 * Yandex PVZ Map Modal Styles
 * Modern, responsive styles for pickup point selection modal
 */

/* Modal overlay */
.pvz-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pvz-map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Modal content */
.pvz-map-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: pvzModalSlideIn 0.3s ease-out;
}

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

/* Modal header */
.pvz-map-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pvz-map-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.pvz-map-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvz-map-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Modal body */
.pvz-map-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

/* Map container */
.pvz-map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Loading state */
.pvz-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.pvz-map-loading p {
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

.pvz-map-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: pvzSpinnerRotate 0.8s linear infinite;
}

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

/* Error state */
.pvz-map-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff5f5;
    padding: 40px;
    text-align: center;
}

.pvz-map-error-message {
    color: #d32f2f;
    font-size: 16px;
    margin-bottom: 20px;
}

.pvz-map-retry-btn {
    padding: 10px 24px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pvz-map-retry-btn:hover {
    background-color: #1976d2;
}

.pvz-selection-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pvz-selection-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4caf50;
}

.pvz-selection-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #333;
}

.pvz-selection-details .pvz-name {
    font-weight: 600;
    color: #000;
}

.pvz-selection-details .pvz-address {
    color: #666;
}

.pvz-selection-details .pvz-schedule {
    font-size: 13px;
    color: #888;
}

/* Modal footer */
.pvz-map-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.pvz-map-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pvz-map-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.pvz-map-btn-secondary:hover {
    background-color: #e0e0e0;
}

.pvz-map-btn-primary {
    background-color: #2196f3;
    color: white;
}

.pvz-map-btn-primary:hover:not(:disabled) {
    background-color: #1976d2;
}

.pvz-map-btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Balloon styles */
.pvz-balloon {
    max-width: 300px;
}

.pvz-balloon p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.pvz-balloon strong {
    font-weight: 600;
    color: #333;
}

.pvz-select-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pvz-select-btn:hover {
    background-color: #1976d2;
}

/* Responsive design */
@media (max-width: 768px) {
    .pvz-map-modal {
        padding: 0;
    }

    .pvz-map-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .pvz-map-modal-header {
        padding: 16px;
    }

    .pvz-map-modal-title {
        font-size: 18px;
    }

    .pvz-map-modal-body {
        min-height: 300px;
    }

    .pvz-map-modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
    }

    .pvz-map-btn {
        width: 100%;
    }
}

/* Yandex Maps specific overrides */
[class*="ymaps"] {
    box-sizing: border-box;
}

/* Balloon custom styles */
.ymaps-2-1-79-balloon {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ymaps-2-1-79-balloon__content {
    padding: 12px;
}
