/**
 * FameHoney Offers - Dark Theme v2.2
 * Centered, dark background, mobile-first
 */

:root {
  --fh-primary: #4f8cff;
  --fh-primary-dark: #3b7ae8;
  --fh-bg-dark: #1a1a2e;
  --fh-bg-darker: #16162a;
  --fh-white: #ffffff;
  --fh-card-bg: #ffffff;
  --fh-border: #e8eaed;
  --fh-text: #202124;
  --fh-text-secondary: #5f6368;
  --fh-text-muted: #80868b;
  --fh-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --fh-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
  --fh-radius: 12px;
  --fh-radius-lg: 20px;
  --fh-transition: 0.2s ease;
}

/* ============================================
   Full Page Container
   ============================================ */
.fh-offers-page {
  background: var(--fh-bg-dark) !important;
  min-height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  box-sizing: border-box;
}

.fh-offers-page *,
.fh-offers-page *::before,
.fh-offers-page *::after {
  box-sizing: border-box;
}

/* ============================================
   Ad Zones - Dark theme
   ============================================ */
.fh-ad-zone {
  padding: 20px;
  text-align: center;
  background: var(--fh-bg-darker);
}

.fh-ad-zone-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fh-ad-zone-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0;
}

/* ============================================
   Layout - Centered
   ============================================ */
.fh-offers-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
}

.fh-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.fh-sidebar--sticky {
  position: relative;
}

.fh-sidebar--stuck {
  position: sticky;
  top: 30px;
  align-self: flex-start;
  height: fit-content;
  z-index: 1;
}
.fh-main {
  flex: 0 1 550px;
  min-width: 0;
}

/* ============================================
   Ad Placeholders - Dark theme
   ============================================ */
.fh-ad {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fh-ad-placeholder {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  font-size: 12px;
  border-radius: var(--fh-radius);
  padding: 20px;
  text-align: center;
}

.fh-ad-header .fh-ad-placeholder,
.fh-ad-footer .fh-ad-placeholder {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.fh-ad-sidebar .fh-ad-placeholder {
  min-height: 250px;
  width: 160px;
}

.fh-ad-in_content .fh-ad-placeholder {
  min-height: 80px;
  width: 100%;
}

/* ============================================
   Inbox Container
   ============================================ */
.fh-inbox {
  background: var(--fh-card-bg);
  border-radius: var(--fh-radius-lg);
  box-shadow: var(--fh-shadow-lg);
  overflow: hidden;
}

/* ============================================
   Inbox Header
   ============================================ */
.fh-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.fh-inbox-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fh-inbox-icon {
  width: 24px;
  height: 24px;
}

.fh-inbox-title {
  font-size: 18px;
  font-weight: 600;
}

.fh-inbox-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.fh-inbox-refresh {
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--fh-transition);
}

.fh-inbox-refresh:hover {
  opacity: 1;
  transform: rotate(180deg);
}

/* ============================================
   Inbox Items
   ============================================ */
.fh-inbox-list {
  padding: 0;
}

.fh-inbox-item {
  border-bottom: 1px solid var(--fh-border);
  margin: 0;
}

.fh-inbox-item:last-child {
  border-bottom: none;
}

.fh-inbox-summary {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  transition: var(--fh-transition);
  gap: 16px;
  list-style: none;
  background: var(--fh-card-bg);
}

.fh-inbox-summary::-webkit-details-marker {
  display: none;
}

.fh-inbox-summary:hover {
  background: #f8f9fa;
}

.fh-inbox-item[open] .fh-inbox-summary {
  background: #eef2ff;
  border-bottom: 1px solid var(--fh-border);
}

/* ============================================
   Avatar
   ============================================ */
.fh-inbox-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fh-inbox-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 17px;
}

/* ============================================
   Meta
   ============================================ */
.fh-inbox-meta {
  flex: 1;
  min-width: 0;
}

.fh-inbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.fh-inbox-sender {
  font-weight: 600;
  color: var(--fh-text);
  font-size: 15px;
}

.fh-inbox-time {
  font-size: 12px;
  color: var(--fh-text-muted);
  white-space: nowrap;
}

.fh-inbox-subject {
  font-size: 14px;
  color: var(--fh-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fh-inbox-arrow {
  font-size: 24px;
  color: var(--fh-text-muted);
  transition: var(--fh-transition);
  flex-shrink: 0;
}

.fh-inbox-item[open] .fh-inbox-arrow {
  transform: rotate(90deg);
  color: var(--fh-primary);
}

/* ============================================
   Detail View
   ============================================ */
.fh-inbox-detail {
  padding: 24px;
  background: #fafbff;
  animation: fh-slide-down 0.25s ease;
}

@keyframes fh-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fh-inbox-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fh-border);
}

.fh-inbox-detail-header > div {
  flex: 1;
}

.fh-inbox-to {
  font-size: 13px;
  color: var(--fh-text-muted);
}

.fh-inbox-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--fh-text-muted);
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--fh-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fh-inbox-close:hover {
  background: #e8e8e8;
  color: var(--fh-text);
}

.fh-inbox-detail-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fh-text);
  margin: 0 0 12px 0;
}

.fh-inbox-detail-intro {
  font-size: 15px;
  color: var(--fh-text-secondary);
  line-height: 1.6;
  margin: 0 0 20px 0;
}

/* ============================================
   Links
   ============================================ */
.fh-inbox-links {
  display: grid;
  gap: 10px;
}

.fh-inbox-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius);
  text-decoration: none !important;
  color: var(--fh-text) !important;
  transition: var(--fh-transition);
}

.fh-inbox-link:hover {
  border-color: var(--fh-primary);
  background: #eef2ff;
  transform: translateX(4px);
}

.fh-inbox-link-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    var(--fh-primary) 0%,
    var(--fh-primary-dark) 100%
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.fh-inbox-link-label {
  font-weight: 500;
  font-size: 15px;
}

/* ============================================
   CTA Button
   ============================================ */
.fh-inbox-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(
    135deg,
    var(--fh-primary) 0%,
    var(--fh-primary-dark) 100%
  );
  color: white !important;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--fh-radius);
  text-decoration: none !important;
  transition: var(--fh-transition);
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(79, 140, 255, 0.3);
}

.fh-inbox-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.4);
}

/* ============================================
   In-Content Ad
   ============================================ */
.fh-inbox-ad {
  padding: 16px 24px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--fh-border);
  text-align: center;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .fh-sidebar {
    display: none;
  }
  .fh-main {
    flex: 1;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .fh-offers-layout {
    padding: 15px;
  }

  .fh-ad-zone {
    padding: 15px;
  }

  .fh-ad-placeholder {
    min-height: 60px !important;
  }

  .fh-inbox {
    border-radius: var(--fh-radius);
  }

  .fh-inbox-header {
    padding: 16px 18px;
  }

  .fh-inbox-summary {
    padding: 14px 18px;
  }

  .fh-inbox-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .fh-inbox-detail {
    padding: 18px;
  }

  .fh-inbox-cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .fh-offers-layout {
    padding: 10px;
  }

  .fh-inbox-summary {
    padding: 12px 14px;
    gap: 12px;
  }

  .fh-inbox-avatar {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .fh-inbox-sender {
    font-size: 14px;
  }

  .fh-inbox-subject {
    font-size: 13px;
  }

  .fh-inbox-arrow {
    display: none;
  }

  .fh-inbox-link {
    padding: 12px 14px;
  }

  .fh-inbox-link-icon {
    width: 32px;
    height: 32px;
  }
}

/* ============================================
   No Messages
   ============================================ */
.fh-no-messages {
  padding: 60px 20px;
  text-align: center;
  color: var(--fh-text-muted);
  background: var(--fh-card-bg);
  border-radius: var(--fh-radius-lg);
}

/* ============================================
   Print
   ============================================ */
@media print {
  .fh-ad,
  .fh-ad-zone,
  .fh-sidebar {
    display: none !important;
  }
  .fh-offers-page {
    background: white !important;
  }
}
