/* ============================================================
   Thai Khonom Dating Website
   File   : assets/css/style.css
   Purpose: Mobile-first site stylesheet (Bootstrap 5 extension)
   Ver    : 1.001.000  |  2026-03-05 00:00:00 GMT
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES (Theme)
   ============================================================ */
:root {
  --pink:         #e91e8c;
  --pink-dark:    #c2185b;
  --pink-light:   #fce4ec;
  --purple:       #9c27b0;
  --purple-dark:  #6a1b9a;
  --purple-light: #f3e5f5;
  --gradient:     linear-gradient(135deg, #e91e8c, #9c27b0);
  --gradient-rev: linear-gradient(135deg, #9c27b0, #e91e8c);
  --dark:         #212121;
  --text-muted:   #757575;
  --border:       #e0e0e0;
  --bg-light:     #fafafa;
  --white:        #ffffff;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:    0 4px 24px rgba(0,0,0,0.12);
  --tab-height:   60px;
  --header-height:54px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body.thai9-app {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.thai9-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--gradient);
  height: var(--header-height);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.thai9-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 12px;
  gap: 8px;
}

.thai9-logo {
  color: #fff !important;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-decoration: none;
}

/* Scrolling announcement ticker */
.thai9-scroll-wrap {
  flex: 1;
  overflow: hidden;
  margin: 0 10px;
}

.thai9-scroll-text {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  white-space: nowrap;
  animation: ticker 22s linear infinite;
}

@keyframes ticker {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.thai9-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Notification bell */
.thai9-bell {
  position: relative;
  color: rgba(255,255,255,0.9) !important;
  font-size: 20px;
  line-height: 1;
}

.thai9-bell:hover { color: #fff !important; }

.thai9-badge {
  position: absolute;
  top: -5px; right: -6px;
  background: #ff5252;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--pink);
}

/* Avatar thumbnail in header */
.thai9-avatar-link { display: block; }

.thai9-avatar-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.7);
}

/* ============================================================
   FLASH / PROMO BANNER
   ============================================================ */
.thai9-flash-banner {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  z-index: 999;
  background: linear-gradient(90deg, #ff8f00, #e91e8c);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 36px 6px 12px;
  text-align: center;
  line-height: 1.4;
}

.thai9-flash-close {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.thai9-main {
  padding-top: calc(var(--header-height) + 8px);
  padding-bottom: 16px;
  min-height: 100vh;
}

/* Extra bottom padding when bottom nav is present */
.thai9-main.has-bottom-nav {
  padding-bottom: calc(var(--tab-height) + 16px);
}

/* Flash banner offset when visible */
.thai9-main.has-flash {
  padding-top: calc(var(--header-height) + 32px + 8px);
}

/* ============================================================
   BOTTOM TAB BAR
   ============================================================ */
.thai9-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--tab-height);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.thai9-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none !important;
  font-size: 10px;
  padding: 4px 0 2px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.thai9-tab-item:hover,
.thai9-tab-item.active {
  color: var(--pink);
}

.thai9-tab-icon-wrap {
  position: relative;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}

.thai9-tab-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: #ff5252;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.thai9-tab-label { font-size: 10px; font-weight: 500; }

/* ============================================================
   CARDS — Profile cards used in browse/home grids
   ============================================================ */
.profile-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.profile-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.profile-card-body {
  padding: 10px 12px 12px;
}

.profile-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Online indicator dot */
.profile-card-online {
  position: absolute;
  top: 8px; right: 8px;
  width: 11px; height: 11px;
  background: #4caf50;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* Like button overlay on card */
.profile-card-like {
  position: absolute;
  bottom: 52px; right: 8px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: color 0.2s, transform 0.15s;
}

.profile-card-like.liked,
.profile-card-like:hover { color: var(--pink); }
.profile-card-like:active { transform: scale(1.2); }

/* New member ribbon */
.profile-card-new {
  position: absolute;
  top: 0; left: 0;
  background: var(--gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 var(--radius-sm) 0;
}

/* ============================================================
   FULL PROFILE VIEW
   ============================================================ */
.profile-photos-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 8px;
  scrollbar-width: none;
}

.profile-photos-scroll::-webkit-scrollbar { display: none; }

.profile-photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.profile-photo-thumb.active {
  border-color: var(--pink);
}

.profile-main-photo {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
}

.profile-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.profile-info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.profile-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* ============================================================
   FORMS
   ============================================================ */
.thai9-form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 480px;
}

.thai9-form-title {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  text-align: center;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.12);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-pink {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  padding: 10px 24px;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-pink:hover  { opacity: 0.92; color: #fff; }
.btn-pink:active { transform: scale(0.98); }

.btn-pink-outline {
  background: transparent;
  color: var(--pink);
  border: 2px solid var(--pink);
  border-radius: 25px;
  font-weight: 600;
  padding: 8px 22px;
  transition: all 0.2s;
}

.btn-pink-outline:hover {
  background: var(--pink);
  color: #fff;
}

.btn-block { width: 100%; }

/* ============================================================
   CHAT / MESSAGES
   ============================================================ */
.chat-bubble {
  max-width: 72%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.chat-bubble.sent {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  margin-left: auto;
}

.chat-bubble.received {
  background: var(--white);
  color: var(--dark);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
}

.chat-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.thai9-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  padding: 12px 12px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.thai9-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 4px;
}

/* ============================================================
   TAGS / BADGES (interests, body type, etc.)
   ============================================================ */
.thai9-tag {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px;
}

.thai9-tag-purple {
  background: var(--purple-light);
  color: var(--purple-dark);
}

/* ============================================================
   ONLINE STATUS BADGE (in list views)
   ============================================================ */
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4caf50;
  margin-right: 4px;
}

.offline-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #bdbdbd;
  margin-right: 4px;
}

/* ============================================================
   SUBSCRIPTION PLAN CARDS
   ============================================================ */
.plan-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.plan-card.featured {
  border-color: var(--pink);
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.plan-card-price {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--pink);
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-stat-icon {
  font-size: 28px;
  color: var(--pink);
}

.admin-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}

.admin-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.thai9-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 0;
  font-size: 12px;
}

.thai9-footer.has-bottom-nav {
  margin-bottom: var(--tab-height);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-link:hover { color: var(--pink); }

.text-pink { color: var(--pink) !important; }

/* ============================================================
   ALERTS / TOASTS
   ============================================================ */
.thai9-alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}

.thai9-alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.thai9-alert-error {
  background: #fce4ec;
  color: #c62828;
  border-left: 4px solid #e91e8c;
}

.thai9-alert-info {
  background: var(--purple-light);
  color: var(--purple-dark);
  border-left: 4px solid var(--purple);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.page-pad    { padding: 12px; }
.page-pad-sm { padding: 8px; }

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth photo hover zoom */
.img-hover-zoom {
  overflow: hidden;
  border-radius: var(--radius);
}

.img-hover-zoom img {
  transition: transform 0.3s ease;
}

.img-hover-zoom:hover img {
  transform: scale(1.05);
}

/* Divider with label */
.divider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 16px 0;
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 375px) {
  /* iPhone SE and very small devices */
  .thai9-logo { font-size: 15px; }
  .thai9-tab-label { display: none; }
  .thai9-tab-icon-wrap { font-size: 24px; }
  var(--tab-height): 50px;
}

@media (min-width: 768px) {
  /* Tablet and above — constrain content width */
  .thai9-main {
    max-width: 680px;
    margin: 0 auto;
  }

  .thai9-bottom-nav {
    max-width: 680px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

@media (min-width: 992px) {
  /* Desktop — wider layout for admin */
  .thai9-main {
    max-width: 960px;
  }
}
