﻿/* ==========================================================================
   CODEXSORS Addons — Only additions that do NOT conflict with site.css
   All layout classes (.burger, .md-drawer, .bnav, .fab-rail, .hero-facts,
   .hero-fact, .header-cta) are handled by the extracted site.css master file.
   ========================================================================== */

/* Brand & Palette */
:root {
  --primary: #FF6A1A;
  --secondary: #3A6EFF;
  --wa-green: #25D366;
  --wa-hover: #1EBE5D;
}

/* 1. Brand Text Logo (custom, not in site.css) */
.brand-text-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
  text-decoration: none;
  white-space: nowrap;
}

.brand-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  box-shadow: 0 0 15px rgba(255, 106, 26, 0.45);
}

/* 2. Language Button (Compact 2-Letter Abbreviation: EN / AR) */
.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  flex: none;
}
.lang-pill-btn:hover {
  border-color: var(--primary);
  color: #FFF;
  background: var(--surface-2);
}

/* 3. Modal Styling */
.codex-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.codex-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.codex-modal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.codex-modal-overlay.open .codex-modal-box {
  transform: scale(1);
}
.codex-modal-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--glass-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.codex-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

/* 4. Form Inputs */
.codex-form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.codex-form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.2);
}

/* 5. Service Card Extras */
.svc-deliverables {
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.svc-deliv-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.svc-deliv-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.svc-deliv-items li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.svc-deliv-items li svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.svc-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.svc-actions-row .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.88rem;
}
.btn--wa {
  background: var(--wa-green);
  color: #FFF;
  border: none;
}
.btn--wa:hover {
  background: var(--wa-hover);
  color: #FFF;
}

/* Full-width Details Button under the 2 action buttons */
.btn--details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}
.btn--details:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px -4px var(--primary-glow);
}
.btn--details .icon {
  transition: transform 0.25s ease;
}
html[dir="rtl"] .btn--details:hover .icon {
  transform: translateX(-4px);
}
html[dir="ltr"] .btn--details:hover .icon {
  transform: translateX(4px);
}

/* 6. Calculator */
.calc-card-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-top: 24px;
}
.calc-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.calc-opt-card {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-opt-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}
.calc-opt-card.active {
  border-color: var(--primary);
  background: rgba(255, 106, 26, 0.1);
  box-shadow: 0 0 20px -5px rgba(255, 106, 26, 0.3);
}
.calc-opt-card input { display: none; }

.calc-feat-label {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.calc-feat-label:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.calc-feat-label.checked {
  border-color: var(--secondary);
  background: rgba(58, 110, 255, 0.12);
  color: #FFF;
}
.calc-feat-label input { accent-color: var(--secondary); }

/* 7. FAQ */
.faq-box-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-box-item:hover { border-color: var(--border-strong); }
.faq-box-item.active {
  border-color: var(--primary);
  background: var(--surface-2);
}
.faq-box-btn {
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: start;
  cursor: pointer;
  font-family: inherit;
}
.faq-box-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-box-answer-inner {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* 8. Toast */
.toast-container {
  position: fixed;
  top: 24px;
  inset-inline-end: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: #FFF;
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

/* 9. Ensure mobile body has bottom padding for bnav */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(var(--bnav-h, 64px) + var(--bnav-gap, .6rem) + env(safe-area-inset-bottom, 0px) + .5rem);
  }
}

/* 10. Secret Admin Trigger */
.admin-secret-trigger {
  color: var(--text-faint) !important;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: color 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.admin-secret-trigger:hover {
  color: var(--text-muted) !important;
}
