/* ============================================================
   global.css — Variables, resets, navbar, footer, auth modal,
   profile modal, and all shared UI components
   ============================================================ */

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
    --primary-blue: #16425B;
    --accent-gold: #D9B468;
    --input-bg-blue: #A8C8D9;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* ─── BASE ───────────────────────────────────────────────────── */
body { font-family: var(--font-body); color: #333; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; }

/* ─── NAVBAR ─────────────────────────────────────────────────── */
.navbar { background-color: #ffffff; border-bottom: 3px solid var(--accent-gold); padding: 15px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.navbar-brand { font-family: var(--font-heading); font-weight: 700; color: var(--primary-blue) !important; border: 2px solid var(--primary-blue); padding: 5px 15px; text-transform: uppercase; letter-spacing: 1px; }
.nav-link { color: var(--primary-blue) !important; font-weight: 600; margin: 0 10px; font-size: 0.95rem; transition: color 0.3s; }
.nav-link:hover { color: var(--accent-gold) !important; }
.nav-icon-btn { background: none; border: none; color: var(--primary-blue); font-size: 1.4rem; margin-left: 15px; cursor: pointer; transition: transform 0.2s; }
.nav-icon-btn:hover { transform: scale(1.1); color: var(--accent-gold); }

/* ─── SECTION UTILITIES ──────────────────────────────────────── */
.section-padding { padding: 80px 0; }
.bg-light-gray { background-color: #f8f9fa; }
.section-header { color: var(--primary-blue); margin-bottom: 50px; text-align: center; font-size: 2.5rem; }
.hidden { display: none !important; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer { background-color: var(--primary-blue); color: white; border-top: 5px solid var(--accent-gold); padding-top: 60px; }
.social-icons i { font-size: 1.5rem; color: white; margin-right: 15px; transition: 0.3s; }
.social-icons i:hover { color: var(--accent-gold); }

.footer-location-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 8px 0;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.footer-location-link:hover {
  text-decoration: none;
  color: var(--accent-gold);
  background-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── SWEETALERT Z-INDEX FIX ─────────────────────────────────── */
.swal2-container { z-index: 99999 !important; }

/* ============================================================
   MODAL SHARED STYLES
   ============================================================ */

/* ─── MODAL OVERLAY ──────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(5px); justify-content: center; align-items: center; }

/* ─── MODAL CONTENT BOX ──────────────────────────────────────── */
.custom-modal-content { background-color: white; padding: 40px; border-radius: 20px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: fadeIn 0.3s ease-out; max-height: 90vh; overflow-y: auto; }
.custom-modal-content h2 { color: var(--primary-blue); text-align: center; margin-bottom: 25px; font-size: 2rem; }
/* Profile modal needs scroll since it has lots of content */
.profile-modal-content { overflow-y: auto !important; }

/* ─── CLOSE BUTTON ───────────────────────────────────────────── */
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 24px; font-weight: bold; cursor: pointer; color: #555; z-index: 10; line-height: 1; }
.close-btn:hover { color: #333; }

/* ─── MODAL LOGO ─────────────────────────────────────────────── */
.modal-logo-wrap { text-align: center; margin-top: -60px; margin-bottom: -20px; }
.modal-logo-wrap--auth { margin-top: -80px; margin-bottom: -40px; }
.modal-logo-wrap--auth-signup { margin-top: -90px; margin-bottom: -40px; }
.modal-logo { height: 200px; width: auto; object-fit: contain; }
.modal-logo--auth { height: 250px; }
/* Legacy logo container support */
.modal-logo-container { display: flex; justify-content: center; margin-bottom: 15px; }

/* ─── FORM CONTAINER ─────────────────────────────────────────── */
.form-container { display: block; }
.form-container[style*="display:none"] { display: none !important; }


.custom-input-group { margin-bottom: 5px; width: 100%; }
.custom-input-group label { display: block; color: var(--primary-blue); font-weight: 600; margin-bottom: 5px; font-size: 0.9rem; }
.custom-input-group input { width: 100%; padding: 12px; margin-bottom: 15px; border: none; background-color: var(--input-bg-blue); color: #000; font-family: var(--font-body); font-size: 1rem; border-radius: 0; box-sizing: border-box; }
.custom-input-group input:focus { outline: 2px solid var(--accent-gold); }
.custom-input-group input.input-error { outline-color: #d9534f !important; border-color: #d9534f !important; }

/* ─── FORM ROW (two columns) ─────────────────────────────────── */
.form-row-custom { display: flex; gap: 15px; margin-bottom: 1px; }
.form-row-custom .custom-input-group { flex: 1; }

/* ─── PASSWORD WRAPPER ───────────────────────────────────────── */
.password-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.password-wrapper input { width: 100%; padding-right: 40px; }
.toggle-password { position: absolute; right: 12px; top: 30%; cursor: pointer; color: #1b365d; font-size: 1rem; transition: color 0.2s ease; }
.toggle-password:hover { color: var(--accent-gold); }

/* ─── ERROR & SUCCESS MESSAGES ───────────────────────────────── */
.error-msg { display: none; color: #d9534f; font-size: 0.8rem; margin-top: -10px; min-height: 18px; text-align: left; }
.inline-error { display: none; color: #d9534f; font-size: 0.85rem; margin-top: 4px; margin-bottom: 8px; }
.inline-success { display: none; color: #28a745; font-size: 0.85rem; margin-bottom: 8px; text-align: center; }

/* ─── SUBMIT BUTTON ──────────────────────────────────────────── */
.modal-submit-btn { display: block; width: 150px; margin: 20px auto; padding: 10px; background: transparent; border: 2px solid var(--accent-gold); color: var(--accent-gold); font-weight: bold; border-radius: 25px; cursor: pointer; font-size: 1rem; transition: 0.3s; text-transform: uppercase; white-space: nowrap; }
.modal-submit-btn:hover { background-color: var(--accent-gold); color: white; }
.modal-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-submit-btn--full { width: 100%; margin: 0; }

/* ─── MODAL ACTION BUTTONS (Cancel / Save rows) ──────────────── */
.modal-btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.modal-btn { padding: 10px 24px; border: none; border-radius: 20px; cursor: pointer; font-weight: 700; font-size: 0.95rem; transition: opacity 0.2s; }
.modal-btn:hover { opacity: 0.85; }
.modal-btn--cancel { background: #eee; color: #333; }
.modal-btn--save { background: var(--accent-gold); color: white; }
.modal-btn--danger { background: #d9534f; color: white; }

/* ─── SWITCH TEXT ────────────────────────────────────────────── */
.switch-text { text-align: center; font-size: 0.85rem; margin-top: 10px; color: #666; }
.switch-text a { color: var(--primary-blue); font-weight: bold; text-decoration: none; }
.switch-text a:hover { text-decoration: underline; }

/* ─── OTP INPUT ──────────────────────────────────────────────── */
.otp-input { width: 100%; text-align: center; font-size: 20px; letter-spacing: 5px; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; background-color: var(--input-bg-blue); }

/* ─── MODAL SUBTEXT ──────────────────────────────────────────── */
.modal-subtext { text-align: center; font-size: 14px; margin-bottom: 20px; color: #666; }

/* ─── CAPTCHA BOX ────────────────────────────────────────────── */
.captcha-box { border: 1px solid var(--accent-gold); padding: 10px; text-align: center; color: var(--primary-blue); margin-bottom: 15px; display: flex; justify-content: center; }

/* ─── PASSWORD CHECKLIST ─────────────────────────────────────── */
.pw-checklist { list-style: none; padding: 6px 2px 0; margin: 0 0 12px 0; font-size: 0.82rem; }
.pw-checklist li { color: #d9534f; margin-bottom: 3px; transition: color 0.2s ease; }
.pw-checklist li:last-child { margin-bottom: 0; }
.pw-check-icon { margin-right: 5px; }

/* ─── FORGOT PASSWORD LINK ───────────────────────────────────── */
.forgot-pw-link { font-size: 0.85rem; color: var(--primary-blue); text-decoration: none; }
.forgot-pw-link:hover { text-decoration: underline; }

/* ============================================================
   PROFILE MENU DROPDOWN
   ============================================================ */
.profile-menu { display: none; position: fixed; top: 70px; right: 50px; background-color: white; width: 280px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 10px; border-top: 4px solid var(--accent-gold); z-index: 2001; animation: fadeIn 0.2s ease-out; overflow: hidden; }
.profile-menu-header { padding: 15px; text-align: center; border-bottom: 1px solid #eee; background-color: #fcfcfc; }
.profile-menu-btn { width: 100%; padding: 12px 20px; background: none; border: none; text-align: left; cursor: pointer; font-size: 0.95rem; transition: background 0.3s; display: flex; justify-content: space-between; align-items: center; color: var(--primary-blue); font-family: var(--font-body); font-weight: 600; }
.profile-menu-btn:hover { background-color: #f5f5f5; color: var(--accent-gold); }
.profile-menu-btn.logout-btn { color: #d9534f; justify-content: center; font-weight: bold; border-top: 1px solid #eee; }
.profile-menu-btn.logout-btn:hover { background-color: #ffeaea; color: #c9302c; }

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.profile-modal-content { max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 20px 30px 30px; }
.profile-modal-title { text-align: center; color: var(--primary-blue); margin-bottom: 20px; font-size: 1.6rem; }

/* ─── PROFILE HEADER ─────────────────────────────────────────── */
.profile-header { display: flex; gap: 16px; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 18px; margin-bottom: 18px; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-gold); display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; }
.profile-avatar-img { display: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-avatar-camera { position: absolute; bottom: 0; right: 0; background: var(--primary-blue); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.2s; }
.profile-avatar-camera:hover { opacity: 0.85; }
.profile-avatar-camera i { color: white; font-size: 10px; }
.profile-name-block { flex: 1; }
.profile-name-row { display: flex; justify-content: space-between; align-items: center; }
.profile-display-name { color: var(--primary-blue); font-weight: 700; font-size: 1.1rem; }
.profile-display-email { color: #666; font-size: 0.9rem; margin-top: 4px; display: block; }
.profile-remove-photo-btn { display: none; font-size: 0.75rem; color: #d9534f; background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; margin-top: 8px; }
.profile-remove-photo-btn:hover { color: #c9302c; }

/* ─── PROFILE INFO ROWS ──────────────────────────────────────── */
.profile-info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 8px; background: #f9f9f9; border: 1px solid #eee; margin-bottom: 10px; }
.profile-field-label { display: block; font-size: 0.75rem; color: #999; letter-spacing: 0.05em; margin-bottom: 3px; font-family: var(--font-body); }
.profile-field-value { color: var(--primary-blue); font-weight: 700; font-size: 0.97rem; }

/* ─── EDIT ICON BUTTON ───────────────────────────────────────── */
.edit-icon-btn { background: none; border: none; cursor: pointer; color: var(--accent-gold); font-size: 1.1rem; transition: 0.2s; padding: 5px; margin-left: 10px; }
.edit-icon-btn:hover { color: var(--primary-blue); transform: scale(1.1); }

/* ─── CHANGE PASSWORD WRAP ───────────────────────────────────── */
.profile-change-pw-wrap { margin-top: 20px; text-align: center; }
.profile-change-pw-btn { width: auto !important; padding: 10px 28px !important; white-space: nowrap; }

/* ─── APPOINTMENT HISTORY ────────────────────────────────────── */
.profile-appt-heading { color: var(--primary-blue); font-size: 1.1rem; margin-top: 28px; border-bottom: 2px solid var(--accent-gold); padding-bottom: 5px; margin-bottom: 14px; }
.profile-appt-heading i { color: var(--accent-gold); margin-right: 8px; }
.appointment-history { max-height: 200px; overflow-y: auto; margin-bottom: 30px; }
.appointment-card { border-left: 4px solid var(--accent-gold); background: #fdfbf9; padding: 15px 20px; margin-bottom: 12px; border-radius: 0 8px 8px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.02); display: flex; flex-direction: column; gap: 5px; transition: transform 0.2s; }
.appointment-card:hover { transform: translateX(5px); }
.appt-date { font-weight: 700; color: var(--primary-blue); font-size: 1.05rem; }
.appt-date i { color: var(--accent-gold); margin-right: 8px; }
.appt-details { font-size: 0.9rem; color: #666; line-height: 1.5; }
.appt-details strong { color: var(--primary-blue); }
.appt-status-msg { text-align: center; color: #666; font-size: 0.9rem; }
.appt-status-msg--error { color: #d9534f; }

.resend-counter {
   font-size: 0.8rem;
   margin-left: 6px;
}

/* 1. The Logo & Brand Column */
.footer-col-brand {
   /* You likely don't need much adjustment here, 
      but you can add padding-right if it feels too close to the links */
   padding-right: 80px; 
 }
 
 /* 2. The Navigation Links (About Us, Services, etc.) */
 .footer-col-pages {
   /* If this column has the vertical line on its right side: */
   /* border-right: 1px solid rgba(255, 255, 255, 0.2); */
   
   /* Increase padding-right to push the dividing line further away from the text */
   padding-right: 60px; 
 }
 
 /* 3. The Eastwood QC Column */
 .footer-col-eastwood {
   /* Increase padding-left to push the text further away from the dividing line */
   padding-left: 150px; 
 }
 
 /* 4. The Sta. Mesa Column */
 .footer-col-stamesa {
   /* To push this content further to the right edge of the screen, 
      you can increase the padding on its left side */
   padding-left: 20px; 
   
   /* Alternatively, if you want the text itself to align to the right edge 
      instead of being left-aligned within its box: */
   /* text-align: right; */
 }

/* ============================================================
   SMALL MODALS (Edit field, Name edit, Password change)
   ============================================================ */
.small-modal-content { max-width: 420px; padding: 20px 28px 36px; }
.small-modal-title { color: var(--primary-blue); text-align: center; margin-bottom: 16px; margin-top: 0; }
.small-modal-subtext { text-align: center; color: #666; font-size: 0.88rem; margin-bottom: 16px; }
.small-modal-input { width: 100%; padding: 12px; border: none; border-radius: 0; font-size: 1rem; box-sizing: border-box; margin-bottom: 8px; background-color: var(--input-bg-blue); font-family: var(--font-body); color: #000; }
.small-modal-input:focus { outline: 2px solid var(--accent-gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    /* Center in viewport; previous right:50% + translateX(50%) pushed the card off-screen */
    .profile-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(280px, calc(100vw - 24px));
        box-sizing: border-box;
    }
}

@media (max-width: 767.98px) {
    .profile-menu {
        top: calc(84px + env(safe-area-inset-top, 0px));
    }

    .profile-menu-header h4,
    .profile-menu-header p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 576px) {
    .form-row-custom { flex-direction: column; gap: 0; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-name-row { justify-content: center; }
}

/* ─── IN-APP NOTIFICATIONS (bell) ───────────────────────────── */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #c9302c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 4px;
    box-sizing: border-box;
}

.notification-panel {
    position: fixed;
    top: 72px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: min(440px, 72vh);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 2002;
    overflow: hidden;
    border-top: 4px solid var(--accent-gold);
    font-family: var(--font-body);
}

.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fcfcfc;
}

.notification-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notification-panel-clear {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: var(--primary-blue);
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s, border-color 0.2s;
}

.notification-panel-clear:hover {
    background: #f5f5f5;
    border-color: var(--accent-gold);
}

.notification-panel-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.notification-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.notification-panel-close:hover {
    color: var(--primary-blue);
}

.notification-panel-body {
    max-height: min(360px, 60vh);
    overflow-y: auto;
    padding: 8px 0;
}

.notification-panel-empty {
    padding: 24px 16px;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.notification-item--unread {
    background: #f8fafc;
}

.notification-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(217, 180, 104, 0.2);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-item--unread .notification-item-icon {
    background: rgba(217, 180, 104, 0.35);
}

.notification-item-title {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.notification-item-msg {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.45;
    margin: 0 0 6px;
}

.notification-reason-list {
    margin: 0 0 8px 1rem;
    padding: 0;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.75rem;
    color: #888;
}

@media (max-width: 991px) {
    .notification-panel {
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}

