/* ═══ Member Page — member-page.css ═══
 * Trang hồ sơ thành viên (member-page)
 * Tách ra từ inline CSS trong views/site/member-page.php
 */

/* ─── CSS Variables ─────────────────────────────────── */
:root {
    --brand: #00b45c;
    --brand-dark: #087a3f;
    --brand-soft: #e8f8ef;
    --ink: #0f1923;
    --ink-2: #1e2a35;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e5eaf0;
    --surface: #f7f9fc;
    --navy: #101827;
    --red: #ef4444;
    --gold: #f5b731;
    --shadow-xs: 0 1px 4px rgba(15,23,42,.07);
    --shadow-sm: 0 4px 14px rgba(15,23,42,.08);
    --shadow-md: 0 12px 36px rgba(15,23,42,.10);
    --shadow-lg: 0 24px 64px rgba(15,23,42,.13);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --ease: cubic-bezier(.22,.68,0,1.1);
}

/* ─── Ticker ─────────────────────────────────────────── */
.v2-ticker { position: relative; z-index: 190; height: 36px; overflow: hidden; background: var(--navy); display: flex; align-items: center; }
.v2-ticker__live { flex-shrink: 0; height: 100%; display: flex; align-items: center; gap: 7px; padding: 0 18px; color: #fff; background: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.v2-ticker__dot { width: 7px; height: 7px; border-radius: 999px; background: #fff; animation: v2Pulse 1.4s ease-in-out infinite; }
@keyframes v2Pulse { 50% { opacity: .45; transform: scale(.72); } }
.v2-ticker__scroll { flex: 1; overflow: hidden; }
.v2-ticker__track { display: flex; white-space: nowrap; animation: v2Ticker 36s linear infinite; }
@keyframes v2Ticker { to { transform: translateX(-50%); } }
.v2-ticker__item { display: inline-flex; align-items: center; gap: 8px; padding-right: 34px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 750; }
.v2-ticker__item::before { content: "·"; color: var(--brand); font-size: 20px; }
.v2-ticker__item b { color: #fff; font-weight: 900; }
.v2-ticker__item em { color: var(--brand); font-style: normal; font-weight: 900; }
.v2-ticker__close { width: 36px; height: 36px; color: rgba(255,255,255,.45); }

/* ─── Hero / Profile ─────────────────────────────────── */
.mp-hero { position: relative; overflow: hidden; padding: 34px 0; background: #fff; }
.mp-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(112deg, rgba(255,255,255,.98), rgba(255,255,255,.88) 50%, rgba(232,248,239,.82)); }
.mp-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,360px); gap: 24px; align-items: start; }
.mp-profile { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 22px; align-items: center; padding: 28px; border: 1px solid rgba(0,180,92,.16); border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-lg); }
.mp-avatar { width: 128px; height: 128px; overflow: hidden; display: grid; place-items: center; border-radius: 32px; color: #fff; background: linear-gradient(135deg,#00d170 0%,#009048 100%); box-shadow: 0 16px 36px rgba(0,144,72,.25); font-size: 48px; font-weight: 800; text-transform: uppercase; border: 4px solid #fff; outline: 1px solid rgba(0,144,72,.15); text-shadow: 0 2px 4px rgba(0,0,0,.15); }
.mp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mp-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 900; }
.mp-title { margin: 0; color: var(--ink); font-size: clamp(30px,3vw,46px); line-height: 1.05; font-weight: 900; letter-spacing: 0; }
.mp-subtitle { max-width: 700px; margin-top: 10px; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.6; }
.mp-areas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mp-area { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 850; box-shadow: var(--shadow-xs); }
.mp-area i { color: var(--brand); }
.mp-area em { color: var(--muted); font-style: normal; font-weight: 800; }
.mp-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mp-trust__item { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: #1f2937; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 850; box-shadow: var(--shadow-xs); }
.mp-trust__item i { color: var(--brand); }
.mp-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 18px; }
.mp-stat { padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.mp-stat strong { display: block; color: var(--ink); font-size: 22px; font-weight: 900; line-height: 1; }
.mp-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }

/* ─── Contact Sidebar ────────────────────────────────── */
.mp-contact { position: sticky; top: 92px; padding: 20px; border: 1.5px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow-md); }
.mp-contact__label { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mp-contact__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 850; }
.mp-contact__row span { color: var(--muted); font-weight: 750; }
.mp-contact__row strong { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.mp-contact__actions { display: grid; gap: 10px; margin-top: 16px; }
.mp-btn,
.mp-btn:link,
.mp-btn:visited,
.mp-btn:hover,
.mp-btn:active,
.mp-btn:focus {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--ink) !important;
    font-size: 13.5px;
    font-weight: 900;
    text-decoration: none !important;
    cursor: pointer;
}
.mp-btn--primary,
.mp-btn--primary:link,
.mp-btn--primary:visited,
.mp-btn--primary:hover,
.mp-btn--primary:active,
.mp-btn--primary:focus {
    color: #fff !important;
    background: linear-gradient(135deg,#13d87f,#00a856);
    border-color: transparent;
    box-shadow: 0 18px 48px rgba(0,180,92,.22);
    text-decoration: none !important;
}
.mp-btn--phone,
.mp-btn--phone:link,
.mp-btn--phone:visited,
.mp-btn--phone:hover,
.mp-btn--phone:active,
.mp-btn--phone:focus {
    color: #fff !important;
    background: var(--red);
    border-color: var(--red);
    text-decoration: none !important;
}

/* ─── Listings Section ───────────────────────────────── */
.mp-section { padding: 34px 0 64px; }
.mp-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 14px; align-items: center; margin-bottom: 18px; }
.mp-heading h2 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: 0; }
.mp-heading h2 span { color: var(--brand); }
.mp-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }

/* Featured section — nền xanh nhạt, tách biệt hẳn */
.mp-featured-section { padding: 32px 0; background: linear-gradient(180deg, #f0fbf6 0%, #fff 100%); border-top: 1px solid rgba(0,180,92,.12); border-bottom: 1px solid rgba(0,180,92,.12); }

/* Listing section — nền trắng sạch */
.mp-listing-section { padding: 32px 0 64px; background: #fff; }

/* Section header shared */
.mp-section-head { margin-bottom: 20px; }
.mp-section-head--row { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.mp-section-title { margin: 0; color: var(--ink); font-size: 26px; font-weight: 900; line-height: 1.15; display: flex; align-items: center; gap: 9px; }
.mp-section-title i { color: var(--brand); font-size: 20px; }
.mp-section-sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }

/* ─── Search Form ────────────────────────────────────── */
.mp-search { display: grid; grid-template-columns: minmax(220px,1.5fr) 150px 150px 150px 120px; gap: 10px; padding: 12px; border: 1px solid rgba(0,180,92,.16); border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 18px 46px rgba(15,23,42,.08); }
.mp-field { position: relative; min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; color: var(--muted); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.mp-field:focus-within { border-color: rgba(0,180,92,.45); background: #fff; box-shadow: 0 0 0 4px rgba(0,180,92,.09); }
.mp-field i { flex: 0 0 auto; color: #7890aa; font-size: 15px; }
.mp-field input, .mp-field select { width: 100%; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 850; }
.mp-field input::placeholder { color: #8da0b6; font-weight: 800; }
.mp-field select { appearance: none; -webkit-appearance: none; padding-right: 24px; cursor: pointer; }
.mp-field--select::after { content: "\f107"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #7890aa; font-family: FontAwesome; font-size: 14px; pointer-events: none; }
.mp-submit { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; color: #fff; background: linear-gradient(135deg,#10c878,#009b53); border-radius: 14px; font-size: 13px; font-weight: 950; box-shadow: 0 14px 28px rgba(0,180,92,.22); transition: transform .18s ease, box-shadow .18s ease; }
.mp-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(0,180,92,.28); }

/* ─── Filter Tabs ────────────────────────────────────── */
.mp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mp-tab,
.mp-tab:link,
.mp-tab:visited,
.mp-tab:hover,
.mp-tab:active { padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted) !important; font-size: 13px; font-weight: 850; text-decoration: none !important; }
.mp-tab--active,
.mp-tab--active:link,
.mp-tab--active:visited,
.mp-tab--active:hover,
.mp-tab--active:active { color: #fff !important; background: var(--navy); border-color: var(--navy); text-decoration: none !important; }

/* ─── Featured Box ───────────────────────────────────── */
.mp-featured { margin-bottom: 24px; padding: 18px; border: 1.5px solid rgba(0,180,92,.18); border-radius: 24px; background: linear-gradient(135deg,#ffffff,#f0fbf5); box-shadow: var(--shadow-sm); }
.mp-featured__head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mp-featured__head h3 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 900; }
.mp-featured__head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.mp-featured__grid { display: grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 12px; }
.mp-featured-card,
.mp-featured-card:link,
.mp-featured-card:visited,
.mp-featured-card:hover,
.mp-featured-card:active { overflow: hidden !important; display: grid !important; grid-template-columns: 1fr !important; grid-template-rows: 150px auto !important; float: none !important; color: var(--ink) !important; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-xs); text-decoration: none !important; }
.mp-featured-card img { width: 100% !important; height: 100% !important; object-fit: cover !important; float: none !important; display: block !important; max-width: 100% !important; }
.mp-featured-card__body { padding: 11px; display: block; }
.mp-featured-card__body * { display: block; }
.mp-featured-card__price { color: var(--brand); font-size: 15px; font-weight: 900; }
.mp-featured-card__title { margin-top: 6px; color: var(--ink); font-size: 12.5px; font-weight: 850; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Listing Grid + Card ────────────────────────────── */
.mp-grid { display: grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 16px; }
.mp-card { overflow: hidden !important; display: flex !important; flex-direction: column !important; float: none !important; border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.mp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(0,180,92,.22); }
.mp-card__media { position: relative !important; display: block !important; aspect-ratio: 4 / 3; width: 100% !important; overflow: hidden; background: var(--surface); }
.mp-card__media img { width: 100% !important; height: 100% !important; object-fit: cover !important; float: none !important; display: block !important; max-width: 100% !important; transition: transform .38s ease; }
.mp-card:hover .mp-card__media img { transform: scale(1.05); }
.mp-card__badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; color: #fff; background: var(--brand); font-size: 11px; font-weight: 900; }
.mp-card__time { position: absolute; bottom: 10px; left: 12px; color: rgba(255,255,255,.92); font-size: 11px; font-weight: 850; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.mp-card__body { padding: 14px; flex: 1; }
.mp-card__price { color: var(--brand); font-size: 19px; font-weight: 900; line-height: 1; }
.mp-card__title { min-height: 40px; margin: 8px 0 10px; color: var(--ink); font-size: 13.5px; font-weight: 850; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 750; }
.mp-card__loc { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card__foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid #f0f4f8; color: var(--muted-2); font-size: 11.5px; font-weight: 750; }
.mp-card__foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; min-width: 0; }
.mp-card__cta,
.mp-card__cta:link,
.mp-card__cta:visited,
.mp-card__cta:hover,
.mp-card__cta:active { color: var(--brand-dark) !important; font-size: 12px; font-weight: 900; flex-shrink: 0; text-decoration: none !important; }
.mp-card__ask { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0 14px 14px; color: #fff; background: var(--brand); border-radius: 12px; font-size: 12px; font-weight: 900; }

/* ─── Empty / Pagination ─────────────────────────────── */
.mp-empty { padding: 56px 20px; text-align: center; background: #fff; border: 1.5px solid var(--line); border-radius: 24px; color: var(--muted); font-weight: 750; }
.mp-pagination { display: flex; justify-content: center; margin-top: 28px; }
.mp-pagination ul { display: flex; align-items: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
.mp-pagination li a, .mp-pagination li span { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 800; }
.mp-pagination li.active a, .mp-pagination li.active span { color: #fff; background: var(--brand); border-color: var(--brand); }

/* ─── Mobile Contact Bar ─────────────────────────────── */
.mp-mobile-contact { display: none; }
.mp-share-note { display: none; margin-top: 8px; color: var(--brand-dark); font-size: 12px; font-weight: 850; text-align: center; }

/* ─── Visited link overrides (chặn Bootstrap CDN đổi màu) ─────
 * Bootstrap 3 CDN set a:visited { color: #428bca } toàn cục.
 * Override lại từng component để giữ đúng màu thiết kế.
 * ─────────────────────────────────────────────────────────── */

/* Featured card */
.mp-featured-card:visited { color: var(--ink); }
.mp-featured-card:visited .mp-featured-card__price { color: var(--brand); }
.mp-featured-card:visited .mp-featured-card__title { color: var(--ink); }

/* Filter tabs */
.mp-tab:visited { color: var(--muted); text-decoration: none; }
.mp-tab--active:visited { color: #fff; }

/* Buttons (a.mp-btn) */
.mp-btn:visited { color: var(--ink); text-decoration: none; }
.mp-btn--primary:visited { color: #fff; }
.mp-btn--phone:visited { color: #fff; }

/* Listing cards — card là <a> bọc toàn bộ */
.mp-card:visited { color: var(--ink); text-decoration: none; }
.mp-card:visited .mp-card__price { color: var(--brand); }
.mp-card:visited .mp-card__title { color: var(--ink); }
.mp-card:visited .mp-card__meta,
.mp-card:visited .mp-card__loc { color: var(--muted); }
.mp-card:visited .mp-card__cta { color: var(--brand-dark); }
.mp-card:visited .mp-card__foot { color: var(--muted-2); }

/* Pagination */
.mp-pagination li a:visited { color: var(--ink); }
.mp-pagination li.active a:visited { color: #fff; }

/* Mobile contact bar */
.mp-mobile-contact__btn:visited { color: var(--ink); }
.mp-mobile-contact__btn--primary:visited { color: #fff; }
.mp-mobile-contact__btn--zalo:visited { color: #fff; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) {
    .mp-hero__grid { grid-template-columns: 1fr !important; }
    .mp-profile { grid-template-columns: 112px minmax(0,1fr) !important; align-items: center; }
    .mp-avatar { width: 112px; height: 112px; border-radius: 28px; font-size: 42px; }
    .mp-contact { position: static; }
    .mp-grid { grid-template-columns: repeat(3,1fr) !important; }
    .mp-featured__grid { grid-template-columns: repeat(2,1fr) !important; }
    .mp-search { grid-template-columns: 1fr 1fr; }
    .mp-submit { grid-column: 1 / -1; }
    .mp-section-head--row { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .mp-title { font-size: clamp(30px, 5vw, 42px); }
    .mp-subtitle { max-width: none; }
}

@media (max-width: 760px) {
    .mp-profile { grid-template-columns: 1fr !important; padding: 22px; }
    .mp-avatar { width: 96px; height: 96px; border-radius: 24px; font-size: 34px; }
    .mp-stats { grid-template-columns: repeat(2,1fr) !important; }
    .mp-toolbar { grid-template-columns: 1fr !important; }
    .mp-search { grid-template-columns: 1fr !important; gap: 10px; padding: 14px; border-radius: 24px; background: linear-gradient(180deg,#fff,#f7fbf9); box-shadow: 0 18px 44px rgba(15,23,42,.10); }
    .mp-field { min-height: 52px; border-radius: 16px; background: #fff; }
    .mp-field input, .mp-field select { height: 50px; font-size: 14px; }
    .mp-submit { min-height: 52px; border-radius: 16px; font-size: 14px; }
    .mp-grid { grid-template-columns: 1fr !important; }
    .mp-featured__grid { grid-template-columns: 1fr !important; }
    .mp-featured-card { grid-template-rows: 190px auto !important; }
    body { padding-bottom: 78px; }
    .mp-mobile-contact { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 350; display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 8px; padding: 8px; background: rgba(255,255,255,.94); border: 1px solid rgba(226,232,240,.95); border-radius: 20px; box-shadow: 0 18px 50px rgba(15,23,42,.18); backdrop-filter: blur(14px); }
    .mp-mobile-contact__btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 12px; font-weight: 900; white-space: nowrap; }
    .mp-mobile-contact__btn--primary { color: #fff; background: var(--red); border-color: var(--red); }
    .mp-mobile-contact__btn--zalo { color: #fff; background: #0b8cff; border-color: #0b8cff; }
}
