/*
Theme Name: TextEnvoy SMS Switch
Theme URI: https://textenvoy.com
Author: TextEnvoy Operations
Author URI: https://textenvoy.com
Description: Official lightweight, native block theme for TextEnvoy SMS Switch. Designed for high performance, accessibility, and modern WordPress Site Editing.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
Text Domain: textenvoy
*/

/* Reset & Global Micro-adjustments */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--wp--preset--color--canvas-light, #F4F7FB);
  color: var(--wp--preset--color--navy-text, #061E48);
  font-family: var(--wp--preset--font-family--inter, sans-serif);
  line-height: 1.6;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 3px solid var(--wp--preset--color--envoy-blue, #0873FB) !important;
  outline-offset: 2px !important;
}

/* Responsive Images & SVGs */
img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--wp--preset--color--envoy-blue, #0873FB);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  z-index: 99999;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Custom Architecture Card Styles */
.te-architecture-card {
  background: #0B2447;
  border: 1px solid var(--wp--preset--color--border-dark, #17325D);
  border-radius: 12px;
  padding: 1.5rem;
  color: #E2E8F0;
  font-family: var(--wp--preset--font-family--mono, monospace);
  font-size: 0.85rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.te-architecture-card .card-header {
  border-bottom: 1px solid #1E3A8A;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  color: var(--wp--preset--color--accent-cyan, #06BFF1);
  font-weight: 700;
}
.te-architecture-card .card-section {
  margin-bottom: 1rem;
}
.te-architecture-card .card-section strong {
  display: block;
  color: #93C5FD;
  margin-bottom: 0.25rem;
}

/* Status Pill */
.te-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--wp--preset--color--accent-cyan, #06BFF1);
  background: rgba(6, 191, 241, 0.1);
  color: var(--wp--preset--color--accent-cyan, #06BFF1);
}
.te-status-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--wp--preset--color--accent-cyan, #06BFF1);
}

/* Responsive Table Overrides */
.te-responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.te-responsive-table th,
.te-responsive-table td {
  padding: 1rem 1.25rem;
  border: 1px solid var(--wp--preset--color--border-subdued, #DDE5F0);
  text-align: left;
}
.te-responsive-table th {
  background-color: #EDF2F7;
  font-weight: 700;
  color: var(--wp--preset--color--navy-text, #061E48);
}
.te-responsive-table tr:nth-child(even) td {
  background-color: #F8FAFC;
}
.te-badge-check {
  color: #059669;
  font-weight: 700;
}

/* -------------------------------------------------------------
   Top Navigation / Header Alignment (Matching BX Studio reference)
   Left: Brand Logo | Center: Navigation Links | Right: CTA Button
------------------------------------------------------------- */
.te-site-header {
  box-sizing: border-box;
}

@media (min-width: 861px) {
  header.te-site-header {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    width: 100% !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    padding-left: clamp(1.5rem, 4vw, 3rem) !important;
    padding-right: clamp(1.5rem, 4vw, 3rem) !important;
  }

  .te-header-brand {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
  }

  .te-header-nav {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .te-header-nav .wp-block-navigation__container {
    display: flex !important;
    align-items: center !important;
    gap: clamp(1.25rem, 2vw, 2.25rem) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .te-header-nav .wp-block-navigation-item {
    white-space: nowrap;
  }

  .te-header-nav .wp-block-navigation-item__content {
    color: #E2E8F0 !important;
    transition: color 0.15s ease;
  }

  .te-header-nav .wp-block-navigation-item__content:hover {
    color: #06BFF1 !important;
    text-decoration: none !important;
  }

  .te-header-cta {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}

@media (max-width: 860px) {
  header.te-site-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
  }

  .te-header-brand {
    order: 1;
    flex: 0 0 auto;
  }

  .te-header-brand img {
    max-height: 36px !important;
  }

  .te-header-cta {
    order: 2;
    margin-left: auto !important;
    margin-right: 0.75rem !important;
  }

  .te-header-cta .wp-block-button__link {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.8rem !important;
  }

  .te-header-nav {
    order: 3;
    flex: 0 0 auto;
  }
}

