/* Map System Styles */

.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.map-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-modal-content {
    background: white;
    width: 95%;
    height: 90%;
    max-width: 1200px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.map-modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-medium) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.map-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#modalMap {
    width: 100%;
    height: 100%;
}

.map-modal-footer {
    padding: 1.5rem;
    background: linear-gradient(135deg, #faf8f3 0%, #f5f1e8 100%);
    border-top: 2px solid rgba(107, 62, 46, 0.1);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.map-modal-info {
    flex: 1;
    min-width: 200px;
}

.map-modal-address {
    font-size: 1rem;
    color: var(--brown-dark);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.map-modal-coords {
    font-size: 0.85rem;
    color: var(--brown-medium);
    font-family: monospace;
}

.map-modal-actions {
    display: flex;
    gap: 0.5rem;
}

.map-modal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-modal-btn-primary {
    background: var(--brown-dark);
    color: white;
}

.map-modal-btn-primary:hover {
    background: var(--brown-medium);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 62, 46, 0.3);
}

.map-modal-btn-secondary {
    background: #f5f5f5;
    color: var(--brown-dark);
}

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

.map-search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 90%;
    width: 500px;
}

.map-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.3rem;
}

.map-search-btn {
    background: var(--brown-dark);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-search-btn:hover {
    background: var(--brown-medium);
}

.location-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.map-btn {
    flex: 1;
    padding: 0.7rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.map-btn-primary {
    background: #34A853;
    color: white;
}

.map-btn-primary:hover {
    background: #2d8e47;
    transform: translateY(-1px);
}

.map-btn-secondary {
    background: #4285F4;
    color: white;
}

.map-btn-secondary:hover {
    background: #357ae8;
    transform: translateY(-1px);
}

.map-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.location-confirmed {
    background: #e8f5e9;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 0.5rem;
    border: 2px solid #4caf50;
    display: none;
}

.location-confirmed.active {
    display: block;
}

.location-confirmed-text {
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.location-confirmed-address {
    font-size: 0.85rem;
    color: #1b5e20;
    line-height: 1.4;
    white-space: pre-line;
}

/* Responsive */
@media (max-width: 768px) {
    .map-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .map-modal-title {
        font-size: 1.3rem;
    }

    .map-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .map-modal-actions {
        width: 100%;
    }

    .map-modal-btn {
        flex: 1;
        justify-content: center;
    }

    .map-search-container {
        width: calc(100% - 40px);
        top: 10px;
    }

    .location-controls {
        flex-direction: column;
    }
}
