/* 
  Minimalist Luxury Dark Glassmorphism Stylesheet
*/

body.theme-dark {
  --bg-main: #0a0e17;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-input: rgba(31, 41, 55, 0.85);
  --text-primary: #f9fafb;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(10, 14, 23, 0.88);
  --footer-bg: #060911;
  --hover-bg: rgba(255, 255, 255, 0.06);

  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse at 10% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 85%, rgba(245, 158, 11, 0.07) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

/* Card Elements */
.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 1.15rem;
}

.card-media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.glass-card:hover .card-media img {
  transform: scale(1.04);
}

.media-badge, .aff-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.9);
  color: #0f172a;
}

.prov-tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  line-height: 1.6;
}

.card-footer, .card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Thailand Vector Map */
.thailand-map-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.map-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.map-svg-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
}

.thailand-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.province-path {
  transition: all 0.2s ease;
  cursor: pointer;
}

.province-path:hover {
  filter: brightness(1.3);
  stroke: #ffffff;
  stroke-width: 2;
}

.map-tooltip {
  position: absolute;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.map-sidebar-stats {
  padding: 1.35rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid var(--border-color);
}

.top-prov-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  border-radius: 10px;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
}

.top-prov-item:hover {
  background: rgba(56, 189, 248, 0.12);
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.rank-1 { background: #f59e0b; color: #0f172a; }
.rank-2 { background: #9ca3af; color: #0f172a; }
.rank-3 { background: #b45309; color: #fff; }

/* Slideshow */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 340px;
  border-radius: 18px;
  overflow: hidden;
}

.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide-item.active { opacity: 1; }

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.8);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

/* Admin Data Table */
.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-data-table th, .admin-data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 0.88rem;
}

.admin-data-table th {
  color: var(--accent-cyan);
  font-weight: 600;
}

.action-cell {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.edit-btn:hover { background: var(--accent-cyan); color: #0f172a; }
.delete-btn:hover { background: var(--accent-rose); color: #fff; }

@media (max-width: 992px) {
  .map-grid-layout { grid-template-columns: 1fr; }
}
