.store-details-content {
    padding: 20px;
}

.store-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.store-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    color: #000;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    z-index: 1001;
}

.store-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.store-popup-header h2 {
    margin: 0;
    font-size: 24px;
}

.store-popup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    height: 100%;
}

.store-popup-grid.show-stores {
    grid-template-columns: 1fr 350px;
}

@media screen and (max-width: 767px) {
    .store-popup-grid.show-stores {
        grid-template-columns: 1fr;
    }
}

.store-map-column {
    min-height: 270px;
}

.store-info-column {
    display: none;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
    max-height: 500px;
    overflow-y: auto;
}

.store-info-column.active {
    display: block;
}

.store-map {
    width: 100%;
    height: 350px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.stores-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.stores-list h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
    color: #333;
    font-size: 18px;
    position: sticky;
    top: 0;
    background: #f8f8f8;
    z-index: 1;
}

.store-item {
    display: none;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-item.selected {
    display: block;
    border: 2px solid #1979c3;
    background: #f5f9fc;
    margin-bottom: 15px;
}

.store-item.selected .store-header h4 {
    color: #1979c3;
}

.store-item .delivery-status {
    color: #1979c3;
    font-weight: 600;
}

.store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.store-item.in-range {
    border-left: 4px solid #72f593;
    background-color: #f8fff9;
}

.store-item.in-range .delivery-status {
    background-color: #72f593;
    color: #fff;
}

.store-item[data-distance]:not(.in-range) .delivery-status::after {
    content: " (" attr(data-distance) " km)";
    font-size: 0.9em;
    opacity: 0.8;
}

.store-item.out-of-range {
    display: none;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.store-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.delivery-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.delivery-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.delivery-status.inactive {
    background: #ffebee;
    color: #c62828;
}

.store-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-row strong {
    color: #666;
    font-size: 12px;
}

.info-row span {
    color: #333;
    font-size: 13px;
}

.location-check {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
}

.location-result {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}

.location-result.success {
    display: block;
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.location-result.error {
    display: block;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.location-result.warning {
    display: block;
    color: #856404;
    background: #fdf0d5;
    border: 1px solid #f4d598;
}

.user-location-info,
.store-location-info {
    color: #333;
    padding: 5px;
}

.user-location-info h4,
.store-location-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.user-location-info p,
.store-location-info p {
    margin: 4px 0;
    font-size: 12px;
}

.button-wrapper {
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.store-submit-btn {
    padding: 8px 20px;
    background: #1979c3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.store-submit-btn:hover {
    background: #1565c0;
}

.map-error {
    padding: 20px;
    text-align: center;
    color: #ff0000;
    font-weight: bold;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-item strong {
    color: #333;
    font-size: 14px;
}

.info-item span {
    color: #666;
    font-size: 13px;
}

.no-stores-message {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    display: none;
}

.no-stores-message.visible {
    display: block;
}

body.store-popup-open {
    overflow: hidden;
}

#store-details-button {
    margin-left: 10px;
    margin-right: 10px;
}

.switch-store-link {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #1979c3;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.switch-store-link:hover,
.switch-store-link:focus {
    background: #165c90;
    color: #fff;
    text-decoration: none;
}

.store-item.selected .switch-store-link {
    background: #28a745;
}

.store-item.selected .switch-store-link:hover,
.store-item.selected .switch-store-link:focus {
    background: #218838;
}

@media screen and (max-width: 767px) {
    .store-popup-container {
        width: 95%;
        max-height: 90vh;
        overflow: hidden;
        padding: 15px;
    }

    .store-map-column {
        min-height: auto;
    }

    .store-map {
        height: 250px;
    }

    .store-info-column {
        max-height: calc(90vh - 400px);
    }

    .stores-list {
        max-height: calc(90vh - 450px);
        overflow-y: auto;
        padding-right: 5px;
    }

    .stores-list::-webkit-scrollbar {
        width: 4px;
    }

    .stores-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .stores-list::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .store-popup-grid {
        max-height: calc(90vh - 100px);
        overflow: hidden;
    }
}
