/*
Theme Name:        MexOTT App
Theme URI:         https://mextechltd.name.ng
Author:            MexTech Limited
Author URI:        https://mextechltd.name.ng
Description:       A bespoke mobile-first WordPress theme designed exclusively for MexOTT Pro. Delivers a native app-like experience with pure black background, military green accents, persistent bottom navigation, smooth page transitions, and full compatibility with MexOTT Pro plugin sessions and shortcodes.
Version:           1.0.0
Requires at least: 5.8
Requires PHP:      7.4
Tested up to:      6.7
License:           Proprietary
License URI:       https://mextechltd.name.ng/license
Text Domain:       mexott-app
Tags:              mobile-first, app-style, dark, one-column, custom-menu, custom-logo

Copyright 2026 MexTech Limited (https://mextechltd.name.ng)
All Rights Reserved. Unauthorised copying or distribution is strictly prohibited.
*/

/* ══════════════════════════════════════════════════════════════════════════════
   MexOTT App Theme – Main Stylesheet
   Pure Black · Military Green · Mobile-First App UI
   Copyright 2026 MexTech Limited – All Rights Reserved
══════════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  --app-primary:      #4b5320;
  --app-primary-l:    #5c6626;
  --app-accent:       #7a8c2e;
  --app-bg:           #000000;
  --app-bg-surface:   #0a0a0a;
  --app-bg-card:      #0d0d0d;
  --app-border:       rgba(255,255,255,.07);
  --app-text:         #f0f0f0;
  --app-text-muted:   #888;
  --app-text-subtle:  #444;
  --app-radius:       14px;
  --app-radius-sm:    8px;
  --app-nav-h:        62px;
  --app-header-h:     56px;
  --app-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --app-font-display: 'Sora', var(--app-font);
  --app-safe-bottom:  env(safe-area-inset-bottom, 0px);
  --app-transition:   all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--app-bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: var(--app-font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100%;
  overscroll-behavior: contain;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App Shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  max-width: 520px;
  margin: 0 auto;
  background: var(--app-bg);
  position: relative;
}

@media (min-width: 521px) {
  .app-shell {
    box-shadow: 0 0 60px rgba(0,0,0,.8);
    border-left: 1px solid var(--app-border);
    border-right: 1px solid var(--app-border);
  }

  body {
    background: #050505;
  }
}

/* ── App Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--app-border);
  height: var(--app-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.app-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.app-header-logo img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.app-header-logo-text {
  font-family: var(--app-font-display);
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #5c6626, #7a8c2e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .3px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: var(--app-text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  text-decoration: none;
  transition: var(--app-transition);
}

.app-header-btn:hover { background: rgba(255,255,255,.1); color: var(--app-text); }
.app-header-btn--primary { background: var(--app-primary); color: #fff; border-color: var(--app-primary); }
.app-header-btn--primary:hover { background: var(--app-primary-l); color: #fff; }

/* ── Header icon button (login / logout) ── */
.app-header-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--app-transition);
  flex-shrink: 0;
}
.app-header-icon-btn:hover {
  background: rgba(75,83,32,.25);
  border-color: rgba(75,83,32,.5);
  color: #96a83a;
}

/* ── Hide all WordPress page/post entry titles on frontend ── */
.entry-title,
.page-title,
.post-title,
.wp-block-post-title,
h1.entry-title,
h2.entry-title,
h1.page-title,
.site-title,
.page-header,
.entry-header .entry-title,
article .entry-title {
  display: none !important;
}

.app-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-primary), var(--app-accent));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--app-font-display);
  outline: 2px solid rgba(150, 168, 58, 0.7);
  outline-offset: 2px;
  box-shadow: 0 0 8px rgba(150, 168, 58, 0.5), 0 0 16px rgba(150, 168, 58, 0.2);
  animation: avatarGlow 2.5s ease-in-out infinite;
}
@keyframes avatarGlow {
  0%, 100% {
    outline-color: rgba(150, 168, 58, 0.7);
    box-shadow: 0 0 8px rgba(150, 168, 58, 0.5), 0 0 16px rgba(150, 168, 58, 0.2);
  }
  50% {
    outline-color: rgba(168, 200, 58, 1);
    box-shadow: 0 0 12px rgba(150, 168, 58, 0.85), 0 0 24px rgba(150, 168, 58, 0.35);
  }
}

/* ── Main content area ── */
.app-main {
  flex: 1;
  padding-bottom: calc(var(--app-nav-h) + var(--app-safe-bottom) + 8px);
  overflow-x: hidden;
}

/* ── Bottom Navigation ── */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: rgba(0,0,0,.95);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--app-border);
  height: calc(var(--app-nav-h) + var(--app-safe-bottom));
  padding-bottom: var(--app-safe-bottom);
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
  z-index: 300;
}

.app-nav-items {
  display: flex;
  width: 100%;
  justify-content: space-around;
}

.app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--app-text-subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  transition: color .2s;
  position: relative;
  min-width: 52px;
  cursor: pointer;
  border: none;
  background: none;
}

.app-nav-item.active,
.app-nav-item:hover { color: var(--app-primary); }

.app-nav-item.active .app-nav-icon { color: var(--app-primary); }

.app-nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
}

.app-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.app-nav-item.active .app-nav-icon { transform: scale(1.1); }

.app-nav-label { text-transform: uppercase; }

.app-nav-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: #e53935;
  border-radius: 50%;
  border: 1.5px solid #000;
}

/* ── Page Sections ── */
.app-section {
  padding: 16px;
}

.app-section + .app-section {
  padding-top: 0;
}

/* ── Cards ── */
.app-card {
  background: var(--app-bg-card);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  overflow: hidden;
  transition: var(--app-transition);
}

.app-card + .app-card { margin-top: 12px; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--app-font-display);
  color: #fff;
  line-height: 1.2;
}

a { color: var(--app-accent); }
a:hover { color: #fff; }

img { max-width: 100%; height: auto; }

/* ── WordPress core overrides ── */
.wp-block-group,
.entry-content > *:not(.mexott-livetv-wrap):not(.mexott-page-wrap) {
  max-width: 100%;
  padding: 0 16px;
}

.entry-content > .mexott-page-wrap,
.entry-content > .mexott-livetv-wrap {
  padding: 0;
  margin: 0;
}

.site-content { padding: 0; }
.alignfull, .alignwide { margin-left: -16px; margin-right: -16px; }

/* ── Gutenberg paragraph ── */
.wp-block-paragraph,
.entry-content p {
  color: var(--app-text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ── Page fade-in animation ── */
.app-main {
  animation: appPageIn .25s ease both;
}

@keyframes appPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Custom Scrollbar — branded, refined ── */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(75,83,32,.45) transparent;
}

/* Webkit / Blink (Chrome, Safari, Edge, Samsung Browser) */
::-webkit-scrollbar              { width: 4px; height: 4px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        {
  background: rgba(75,83,32,.45);
  border-radius: 100px;
  transition: background .2s;
}
::-webkit-scrollbar-thumb:hover  { background: var(--app-accent, #7a8c2e); }
::-webkit-scrollbar-corner       { background: transparent; }

/* ── Selection ── */
::selection { background: var(--app-primary); color: #fff; }

/* ── Utility classes ── */
.app-text-center  { text-align: center; }
.app-text-muted   { color: var(--app-text-muted); }
.app-mt-1         { margin-top: 8px; }
.app-mt-2         { margin-top: 16px; }
.app-hidden       { display: none !important; }

/* ── Loading skeleton ── */
.app-skeleton {
  background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%);
  background-size: 200% 100%;
  animation: appSkeleton 1.5s infinite;
  border-radius: var(--app-radius-sm);
}

@keyframes appSkeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Error / 404 ── */
.app-error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
  text-align: center;
}

.app-error-code { font-size: 80px; font-weight: 900; color: var(--app-primary); line-height: 1; opacity: .5; }
.app-error-title { font-size: 22px; font-weight: 700; color: #fff; margin: 12px 0 8px; }
.app-error-msg   { color: var(--app-text-muted); font-size: 14px; margin-bottom: 24px; }

/* ── Hamburger menu (desktop sidebar trigger) ── */
.app-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.app-menu-overlay.open { opacity: 1; pointer-events: all; }

/* ── WP Admin Bar override ── */
#wpadminbar { top: auto !important; bottom: 0 !important; display: none; }
@media (min-width: 783px) { #wpadminbar { display: block; } }
html.wp-toolbar { padding-top: 0 !important; }
body.admin-bar .app-header { top: 0; }
