/* ===========================
   Hospia Location Detection CSS
   =========================== */

/* Modal Overlay */
.loc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.loc-modal.loc-modal-visible {
    opacity: 1;
}

.loc-modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: locSlideUp 0.3s ease;
}

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

.loc-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

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

.loc-icon {
    font-size: 52px;
    margin-bottom: 16px;
    display: block;
}

.loc-modal-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.loc-modal-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.loc-modal-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.loc-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loc-btn-primary {
    background: #0a7cff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.loc-btn-primary:hover { background: #0068e0; }

.loc-btn-secondary {
    background: none;
    color: #0a7cff;
    border: 1.5px solid #0a7cff;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.loc-btn-secondary:hover {
    background: #f0f7ff;
}

/* Manual Selection */
.loc-select,
.loc-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.loc-select:focus,
.loc-input:focus {
    border-color: #0a7cff;
    box-shadow: 0 0 0 3px rgba(10, 124, 255, 0.1);
}

.loc-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.loc-area-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.loc-area-item:last-child { border-bottom: none; }
.loc-area-item:hover { background: #f5f8ff; }
.loc-area-item strong { color: #1a1a1a; }
.loc-area-item small { color: #999; }

/* Current Location Display (header) */
#current-location-display {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f0f7ff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82rem;
    white-space: nowrap;
}

.loc-pin { font-size: 14px; }

.loc-label {
    color: #1a1a1a;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-change-btn {
    background: none;
    border: none;
    color: #0a7cff;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    text-decoration: underline;
}

/* Spinner */
.loc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #0a7cff;
    border-radius: 50%;
    animation: locSpin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Toast */
.loc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 100001;
    opacity: 0;
    transition: all 0.35s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.loc-toast.loc-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile */
@media (max-width: 480px) {
    .loc-modal-card {
        padding: 28px 20px;
    }
}
