/* LocLit Modal Styles - Apple-inspired Design */

/* Modal Overlay */
.loclit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
}

.loclit-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.loclit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 2001; /* Higher than overlay */
}

.loclit-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.loclit-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.loclit-modal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Modal Close Button */
.loclit-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.loclit-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.loclit-modal-close svg {
    width: 16px;
    height: 16px;
    fill: #1d1d1f;
}

/* Modal Body */
.loclit-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1d1d1f;
    line-height: 1.6;
}

.loclit-modal-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #1d1d1f;
}

.loclit-modal-body h3:first-child {
    margin-top: 0;
}

.loclit-modal-body p {
    font-size: 15px;
    margin: 0 0 16px;
    color: #424245;
}

.loclit-modal-body > div {
    margin-bottom: 20px;
}

/* Scrollbar Styling */
.loclit-modal-body::-webkit-scrollbar {
    width: 8px;
}

.loclit-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.loclit-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.loclit-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .loclit-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .loclit-modal-header {
        padding: 20px 20px 16px;
    }
    
    .loclit-modal-title {
        font-size: 20px;
    }
    
    .loclit-modal-body {
        padding: 20px;
    }
    
    .loclit-modal-body h3 {
        font-size: 16px;
    }
    
    .loclit-modal-body p {
        font-size: 14px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}
