/* ======================================================
   Sarekam CSS — overlays.css
   Extracted from index.html | Phase 1 Refactor
   DO NOT add styles from other sections to this file.
   ====================================================== */

        .location-view, .edit-address-view, .full-map-view, .profile-view, .edit-profile-view {
            position: fixed;
            top: 0;
            right: 0;
            width: 420px;
            max-width: 100%;
            height: 100%;
            background-color: var(--white);
            z-index: 4500;
            box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .location-view.active, .edit-address-view.active, .full-map-view.active, .profile-view.active, .edit-profile-view.active {
            transform: translateX(0);
        }

        .loc-header-nav {
            display: flex;
            align-items: center;
            padding: 24px 20px 20px;
            gap: 16px;
            background: var(--loc-bg);
            border-bottom: 1px solid var(--border-color);
        }
        .loc-header-nav.white-bg { background: var(--white); } 
        .loc-header-nav .back-btn { font-size: 20px; color: var(--text-dark); cursor: pointer; padding: 8px 8px 8px 0; }
        .loc-header-nav h2 { font-size: 18px; font-weight: 800; color: var(--text-dark); margin: 0; }

        .loc-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 40px; }
        .loc-scroll::-webkit-scrollbar { display: none; }

        .loc-search-box { background: var(--white); border: 1px solid #e2e8e4; border-radius: 12px; display: flex; align-items: center; padding: 0 16px; height: 52px; margin-bottom: 20px; }
        .loc-search-box input { flex: 1; border: none; outline: none; font-size: 15px; font-weight: 600; color: var(--text-dark); background: transparent; }
        .loc-search-box input::placeholder { color: #9daaa3; font-weight: 500; }
        .loc-search-box i { color: #7f8e87; font-size: 18px; }

        .loc-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
        .loc-action-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; cursor: pointer; text-align: left; }
        .loc-action-card i { font-size: 18px; }
        .loc-action-card span { font-size: 12px; font-weight: 700; color: #4b5563; line-height: 1.3; }

        .saved-title { font-size: 12px; font-weight: 700; color: #7f8e87; margin-bottom: 12px; letter-spacing: 0.5px; }

        .saved-card { background: var(--white); border-radius: 16px; padding: 16px; display: flex; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); border: 1px solid #f0f2f1; position: relative; text-align: left; }
        .saved-icon-box { background: #f3f4f6; width: 48px; height: 48px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; color: #1a1a1a; flex-shrink: 0; }
        .saved-icon-box i { font-size: 14px; }
        .saved-icon-box span { font-size: 11px; font-weight: 700; }

        .saved-details { flex: 1; display: flex; flex-direction: column; gap: 6px; }
        .saved-card-header { display: flex; align-items: center; gap: 10px; }
        .saved-card-header h3 { font-size: 16px; font-weight: 800; color: var(--text-dark); margin: 0; }
        .selected-badge { background: #dcfce7; color: #16a34a; font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 4px; letter-spacing: 0.5px; }
        .saved-card.is-selected { border-color: #10b981; background: #f0fdf4; }
        .saved-card { cursor: pointer; transition: border-color 0.2s, background 0.2s; }
        .saved-details p { font-size: 13px; font-weight: 500; color: var(--text-grey); line-height: 1.4; padding-right: 16px; margin: 0; }

        /* Context Menu */
        .saved-menu-container { position: absolute; top: 16px; right: 16px; }
        .saved-menu-btn { color: #1a1a1a; padding: 4px 8px; cursor: pointer; font-size: 18px; }
        .saved-dropdown { position: absolute; top: 32px; right: 0; background-color: #171923; border-radius: 12px; padding: 8px 0; width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); display: none; z-index: 100; }
        .saved-dropdown.active { display: block; }
        .dropdown-item { padding: 12px 16px; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
        .dropdown-item:hover { background-color: #2d3748; }
        .dropdown-item i { font-size: 14px; color: #e2e8f0; width: 16px; text-align: center; }

        /* "PIN YOUR LOCATION" */
        .edit-address-scroll { flex: 1; overflow-y: auto; padding-bottom: 20px; }
        .edit-address-scroll::-webkit-scrollbar { display: none; }

        .map-placeholder { width: 100%; height: 200px; background: #e8ebe8; position: relative; overflow: hidden; }
        #smallMapContainer { width: 100%; height: 100%; }
        .map-expand-btn {
            position: absolute; bottom: 12px; right: 12px; z-index: 500;
            background: white; border-radius: 20px; padding: 7px 14px;
            font-size: 12px; font-weight: 700; color: #0c8a5a;
            box-shadow: 0 2px 10px rgba(0,0,0,0.18); cursor: pointer;
            display: flex; align-items: center; gap: 6px;
            border: 1px solid rgba(0,0,0,0.06); transition: box-shadow 0.2s;
        }
        .map-expand-btn:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.22); }
        .map-expand-btn i { font-size: 12px; }
        #fullMapContainer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

        .address-form-container { padding: 20px 16px; text-align: left; }

        /* Floating Label Input Style */
        .input-wrapper { position: relative; margin-bottom: 22px; }
        .input-wrapper label { position: absolute; top: -9px; left: 12px; background: #fff; padding: 0 6px; font-size: 13px; color: #8a9499; font-weight: 600; z-index: 1; letter-spacing: 0.3px; }
        .input-wrapper input { width: 100%; height: 56px; border: 1px solid #e0e5e2; border-radius: 10px; padding: 0 16px; font-size: 16px; font-weight: 700; color: #111; outline: none; transition: border-color 0.2s; background: transparent; }
        .input-wrapper input:focus { border-color: var(--loc-orange); }
        .input-wrapper input::placeholder { color: #a4b3ac; font-weight: 500; }
        .input-wrapper .clear-icon { position: absolute; right: 16px; top: 18px; color: #b0bcbc; font-size: 16px; cursor: pointer; }

        /* Label Selector Buttons */
        .label-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
        .label-btn { border: 1.5px solid #e0e5e2; background: #fff; border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: #555; cursor: pointer; transition: all 0.18s; white-space: nowrap; }
        .label-btn:hover { border-color: #10b981; color: #10b981; }
        .label-btn.active { border-color: #10b981; background: #f0fdf4; color: #059669; box-shadow: 0 0 0 2px rgba(16,185,129,0.15); }
        .input-wrapper label { position: absolute; top: -9px; left: 12px; background: #fff; padding: 0 6px; font-size: 13px; color: #8a9499; font-weight: 600; z-index: 1; letter-spacing: 0.3px; }

        /* Specific Area/Locality Box Layout */
        .area-wrapper { position: relative; margin-bottom: 22px; text-align: left; }
        .area-wrapper label { position: absolute; top: -9px; left: 12px; background: #fff; padding: 0 6px; font-size: 13px; color: #8a9499; font-weight: 600; z-index: 1; letter-spacing: 0.3px; }
        .area-inner { border: 1px solid #e0e5e2; border-radius: 10px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; background: transparent; min-height: 56px; }
        .area-text { flex: 1; font-size: 14px; font-weight: 500; color: #8a9499; line-height: 1.4; }
        .area-change-btn { background: var(--white); border: 1px solid #e2e8e4; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--loc-orange); cursor: pointer; }
        .area-change-btn i { font-size: 16px; }
        .area-change-btn span { font-size: 11px; font-weight: 700; }

        /* Bottom Confirm Bar */
        .bottom-action-bar { width: 100%; background: var(--white); padding: 16px 20px 30px; border-top: 1px solid var(--card-border); z-index: 10; position: relative; }
        .confirm-btn { width: 100%; height: 50px; background-color: var(--loc-orange); color: var(--white); border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; }
        .confirm-btn:active { opacity: 0.8; }

        /* FULL MAP VIEW */
        .leaflet-control-attribution { font-size: 9px !important; opacity: 0.7; }
        #fullMapContainer .leaflet-bottom.leaflet-right { bottom: 184px !important; right: 10px !important; }

        /* Floating Top Header on Map */
        .map-header-float {
            position: absolute; top: 20px; left: 16px; right: 16px;
            background: var(--white); border-radius: 14px;
            display: flex; align-items: center; padding: 0 16px;
            box-shadow: 0 4px 18px rgba(0,0,0,0.14); z-index: 500; min-height: 52px; flex-wrap: wrap;
        }
        .map-header-float .back-btn { font-size: 20px; color: var(--text-dark); cursor: pointer; padding: 16px 16px 16px 0; }
        .map-search-input { border: none; outline: none; background: transparent; font-size: 14px; font-weight: 500; color: var(--text-dark); flex: 1; padding: 16px 0; }
        .map-search-input::placeholder { color: #a4b3ac; font-weight: 500; }
        .search-icon { font-size: 16px; color: #a4b3ac; padding: 16px 0 16px 16px; cursor: pointer; }
        
        .map-search-results { width: 100%; max-height: 220px; overflow-y: auto; border-top: 1px solid #f0f0f0; }
        .map-search-results::-webkit-scrollbar { width: 4px; }
        .map-search-results::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
        .map-search-results ul { list-style: none; padding: 0; margin: 0; }
        .map-search-results li { padding: 14px 8px; font-size: 13px; font-weight: 500; color: #444; border-bottom: 1px solid #f4f4f4; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
        .map-search-results li:hover { background: #fbfbfb; }
        .map-search-results li i { color: #a4b3ac; margin-top: 2px; }

        /* Central Map Pin */
        .center-pin-large {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -100%);
            color: var(--loc-orange); font-size: 48px;
            filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
            z-index: 500; pointer-events: none;
            transition: transform 0.15s ease;
        }
        .full-map-view.map-dragging .center-pin-large {
            transform: translate(-50%, -110%) scale(1.08);
        }
        .center-pin-shadow {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, 3px);
            width: 14px; height: 6px;
            background: rgba(0,0,0,0.22); border-radius: 50%;
            z-index: 499; pointer-events: none; filter: blur(3px);
        }

        /* Current Location Button */
        .current-loc-btn {
            position: absolute; bottom: 220px; left: 50%;
            transform: translateX(-50%);
            background: var(--white); padding: 10px 18px; border-radius: 24px;
            display: flex; align-items: center; gap: 8px; white-space: nowrap;
            font-size: 13px; font-weight: 700; color: var(--text-dark);
            box-shadow: 0 4px 14px rgba(0,0,0,0.12); z-index: 500; cursor: pointer;
            border: 1px solid rgba(0,0,0,0.06); transition: all 0.2s;
        }
        .current-loc-btn:active { transform: translateX(-50%) scale(0.97); }
        .current-loc-btn i { color: var(--loc-orange); font-size: 16px; }

        /* Bottom Sheet for Map */
        .map-bottom-sheet {
            position: absolute; bottom: 0; width: 100%;
            background: var(--white); padding: 20px 20px 28px;
            border-radius: 24px 24px 0 0;
            box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
            z-index: 500; display: flex; flex-direction: column; gap: 10px;
        }
        .sheet-loc-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--text-dark); text-align: left; }
        .sheet-loc-title i { color: var(--loc-orange); font-size: 16px; flex-shrink: 0; }
        .sheet-loc-desc { font-size: 12px; font-weight: 500; color: var(--text-grey); line-height: 1.5; text-align: left; }

        /* PROFILE SCREEN */
        .profile-scroll, .edit-profile-scroll { flex: 1; overflow-y: auto; padding: 10px 20px 40px; text-align: left; }
        .profile-scroll::-webkit-scrollbar, .edit-profile-scroll::-webkit-scrollbar { display: none; }
        .edit-profile-scroll { padding-bottom: 120px; }

        .user-card { display: flex; align-items: center; margin-bottom: 30px; margin-top: 10px; }
        .user-avatar { width: 70px; height: 70px; background: #e2e8e5; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 30px; color: #a4b3ac; margin-right: 16px; }
        .user-details { flex: 1; display: flex; flex-direction: column; gap: 4px; }
        .name-row { display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; }
        .update-name { font-size: 20px; font-weight: 800; color: var(--text-dark); border-bottom: 2px dashed #b9c4bf; padding-bottom: 2px; display: inline-block; }
        .edit-icon { color: var(--text-light-grey); font-size: 14px; }
        .user-phone { font-size: 14px; color: var(--text-grey); font-weight: 600; }

        .pass-banner { background: linear-gradient(135deg, var(--pass-gradient-start), var(--pass-gradient-end)); border-radius: 16px; padding: 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; box-shadow: 0 4px 12px rgba(76, 29, 149, 0.08); border: 1px solid #ebdfff; cursor: pointer; }
        .pass-logo { font-size: 18px; font-weight: 900; color: var(--pass-text); line-height: 1; }
        .pass-logo span { font-weight: 600; font-size: 14px;}
        .pass-text { font-size: 13px; font-weight: 700; color: var(--pass-text); flex: 1; margin-left: 16px; }
        .pass-banner .fa-chevron-right { color: var(--pass-text); font-size: 14px; }

        .prof-section { margin-bottom: 28px; }
        .prof-section-title { font-size: 15px; font-weight: 800; color: var(--text-dark); margin-bottom: 16px; }

        .bookings-wrap { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
        .bookings-wrap::-webkit-scrollbar { display: none; }
        .booking-card { min-width: 110px; background: var(--white); border: 1px solid var(--card-border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); cursor: pointer; text-align: center; }
        .booking-card i { font-size: 24px; color: var(--text-grey); }
        .booking-card span { font-size: 12px; font-weight: 700; color: var(--text-dark); }

        .action-tile { background: var(--white); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 6px rgba(0,0,0,0.02); cursor: pointer; margin-bottom: 16px; }
        .tile-left { display: flex; align-items: center; gap: 16px; }
        .tile-left i { font-size: 18px; color: var(--text-grey); width: 24px; text-align: center; }
        .tile-left span { font-size: 14px; font-weight: 700; color: var(--text-dark); }
        .action-tile .fa-chevron-right { font-size: 14px; color: var(--text-light-grey); }

        .payment-card { background: var(--white); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); overflow: hidden; }
        .payment-item { padding: 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--card-border); cursor: pointer; }
        .payment-item:last-child { border-bottom: none; }
        .logout-tile { margin-top: 10px; margin-bottom: 20px; }
        .logout-tile .tile-left i, .logout-tile .tile-left span { color: var(--logout-red); }

        /* EDIT PROFILE */
        .large-avatar-container { display: flex; justify-content: center; margin: 20px 0 30px; position: relative; }
        .large-avatar { width: 110px; height: 110px; background: #e2e8e5; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 50px; color: #a4b3ac; }
        .avatar-edit-badge { position: absolute; bottom: 0; right: calc(50% - 45px); width: 32px; height: 32px; background: #3d4a44; color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; border: 3px solid var(--white); cursor: pointer; }

        .edit-form-card { background: var(--white); border: 1px solid var(--card-border); border-radius: 20px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
        .form-title { font-size: 18px; font-weight: 800; color: var(--text-dark); margin-bottom: 20px; border-bottom: 1px solid var(--card-border); padding-bottom: 16px; }
        .form-group { margin-bottom: 20px; text-align: left; }
        .form-group:last-child { margin-bottom: 0; }
        .form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
        .form-group input { width: 100%; height: 48px; border: 1px solid #d1dbd6; border-radius: 12px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--text-dark); outline: none; transition: border-color 0.2s; background: transparent; }
        .form-group input::placeholder { color: #a4b3ac; font-weight: 500; }
        .form-group input:focus:not(.readonly-input) { border-color: var(--swiggy-green); }
        .form-group input.readonly-input { background: #f5f7f9; color: var(--text-grey); cursor: not-allowed; border-color: #e0e8e4; }

        .info-text { display: flex; gap: 8px; font-size: 11px; color: var(--text-grey); font-weight: 600; margin-top: 10px; line-height: 1.4; }
        .info-text i { font-size: 13px; margin-top: 1px; color: var(--text-light-grey); }

        .sticky-bottom-bar { position: absolute; bottom: 0; width: 100%; background: var(--white); padding: 16px 20px 30px; border-top: 1px solid var(--card-border); }
        .update-profile-btn { width: 100%; height: 54px; border-radius: 16px; border: none; font-size: 16px; font-weight: 700; background: #dce3e0; color: #a4b3ac; cursor: not-allowed; }
        .update-profile-btn.active-btn { background: var(--swiggy-green); color: var(--white); cursor: pointer; }

        /* ── Edit Profile: Email OTP Section ─────────────────── */
        .edit-email-wrap {
            display: flex; gap: 10px; align-items: center;
        }
        .edit-email-wrap input { flex: 1; }
        .edit-email-otp-btn {
            display: none; align-items: center; gap: 6px;
            white-space: nowrap;
            padding: 0 16px; height: 48px;
            background: linear-gradient(135deg, #6366f1, #a855f7);
            color: #fff; border: none; border-radius: 12px;
            font-size: 13px; font-weight: 700; cursor: pointer;
            transition: opacity 0.2s;
            flex-shrink: 0;
        }
        .edit-email-otp-btn:hover { opacity: 0.88; }
        .edit-email-otp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .edit-email-hint {
            display: flex; align-items: center; gap: 6px;
            font-size: 11px; font-weight: 600; color: #6366f1;
            margin-top: 8px; line-height: 1.4;
        }
        .edit-email-hint i { font-size: 12px; }

        .edit-email-otp-section {
            margin-top: 14px;
            animation: editOtpSlide 0.3s cubic-bezier(0.34,1.3,0.64,1);
        }
        @keyframes editOtpSlide {
            from { opacity: 0; transform: translateY(-8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .edit-otp-sent-chip {
            display: flex; align-items: center; gap: 8px;
            background: #f0fdf4; border: 1px solid #bbf7d0;
            border-radius: 10px; padding: 9px 14px;
            font-size: 12px; font-weight: 600; color: #15803d;
            margin-bottom: 14px;
        }
        .edit-otp-sent-chip i { color: #22c55e; }
        .edit-otp-sent-chip strong { color: #166534; }

        .edit-otp-boxes {
            display: flex; gap: 10px; justify-content: center; margin-bottom: 14px;
        }
        .edit-otp-box {
            width: 54px; height: 58px;
            border: 2px solid #e5e7eb; border-radius: 12px;
            font-size: 22px; font-weight: 900; text-align: center;
            color: #6366f1; background: #f9fafb; outline: none;
            transition: all 0.18s; caret-color: transparent;
        }
        .edit-otp-box:focus {
            border-color: #6366f1; background: #fff;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.12); transform: scale(1.04);
        }
        .edit-otp-box.filled { border-color: #a855f7; background: #faf5ff; color: #7c3aed; }

        .edit-verify-otp-btn {
            width: 100%; height: 46px;
            background: linear-gradient(135deg, #6366f1, #a855f7);
            color: #fff; border: none; border-radius: 12px;
            font-size: 14px; font-weight: 700; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            transition: opacity 0.2s;
        }
        .edit-verify-otp-btn:hover { opacity: 0.88; }
        .edit-verify-otp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .edit-otp-resend {
            text-align: center; font-size: 12px; color: #9ca3af;
            font-weight: 500; margin: 10px 0 4px;
        }
        #editOtpResendBtn {
            background: none; border: none; color: #6366f1;
            font-weight: 700; font-size: 12px; cursor: pointer;
            text-decoration: underline; padding: 0;
        }
        .edit-cancel-otp-btn {
            display: flex; align-items: center; gap: 6px;
            justify-content: center; background: none; border: none;
            color: #9ca3af; font-size: 12px; font-weight: 600;
            cursor: pointer; margin: 6px auto 0; padding: 4px 8px;
            border-radius: 8px; transition: color 0.18s;
        }
        .edit-cancel-otp-btn:hover { color: #4b5563; background: #f3f4f6; }

        .edit-email-verified {
            display: flex; align-items: center; gap: 6px;
            font-size: 12px; font-weight: 600; color: #16a34a;
            margin-top: 8px;
        }
        .edit-email-verified i { color: #22c55e; }
