/*
Theme Name: TL3 Services
Theme URI: https://tl3.services
Author: TL3
Author URI: https://tl3.services
Description: Custom landing page theme for TL3 Services with animated codeFlow hero.
Version: 1.0.0
Requires at least: WordPress 6.0
Tested up to: WordPress 6.7
License: Proprietary
License URI:
Text Domain: tl3-services
*/

/* ============================================================
   Fonts (self-hosted — woff2 files in css/fonts/, latin subset)
   ============================================================ */

@font-face {
  font-family: "Doto";
  font-style: normal;
  font-weight: 100 900;
  src: url( "css/fonts/doto-latin.woff2" ) format( "woff2" );
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  src: url( "css/fonts/google-sans-latin.woff2" ) format( "woff2" );
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 700;
  src: url( "css/fonts/google-sans-italic-latin.woff2" ) format( "woff2" );
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Base / Reset
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  /* background: #0d1117; */
  background: radial-gradient(1200px 420px at 72% -10%, rgba(88, 166, 255, 0.14), transparent 60%), linear-gradient(160deg, #0d1117 0%, #10151d 55%, #0d1117 100%);
  color: #e6edf3;
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
  font-family: "Google Sans", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   Code Flow — animated code header background (from codeFlow component)
   ============================================================ */

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, 0.16);
}

/* ---------------- Hero with the animated code background ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.code-window {
  /* position: absolute;
  inset: 0; */
  overflow: hidden;
}

/* Each injected code line is positioned here and animated across the screen */
.code-line {
  position: absolute;
  top: 50%;
  left: 0;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 2rem;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.85;
  will-change: transform;
  pointer-events: none;

  animation-name: code-scroll-rtl;
  animation-timing-function: linear;
  animation-duration: 24s;
  animation-fill-mode: backwards;
}

/* Per-line direction modifier: lines with this class travel left-to-right */
.code-line--ltr {
  animation-name: code-scroll-ltr;
}

@keyframes code-scroll-rtl {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(-100vw);
  }
}

@keyframes code-scroll-ltr {
  from {
    transform: translateX(-100vw);
  }
  to {
    transform: translateX(100vw);
  }
}

/* ---------------- Hero foreground content ---------------- */

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 64px 24px;
  text-align: center;
  width: 100%;
  margin: 20px auto;
}

.hero__eyebrow {
  font-family: ui-monospace, monospace;
  color: var(--accent);
  margin: 0 0 12px;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Giant TL3 Services Title ---- */
.hero__title {
  margin: 0 0 16px;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 80px rgba(88, 166, 255, 0.25);
  font-family: "Doto", system-ui, monospace;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  margin: 0 0 28px;
  font-size: 1.125rem;
  font-family: ui-monospace, monospace;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Services Carousel Section ---------------- */

.services-section {
  /* position: absolute; */
  /* top: 50%; */
  /* left: 0; */
  /* right: 0; */
  z-index: 3;
  padding: 48px 0 64px;
  /* background: linear-gradient(180deg, transparent 0%, #0d1117 40%, #0d1117 100%); */
  overflow: hidden;
  /* transform: translateY(-50%); */
  clear: both;
}

.services-section--single {
  position: static;
  background: transparent;
  padding: 32px 0 64px;
  overflow: visible;
}

/* Single service wrapper */
.single-service-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.single-service-card {
  flex: none;
  width: 100%;
  max-width: 1200px;
  background: transparent;
  border: none;
  padding: 28px 0 24px;
}

body.page .single-service-wrapper ,
body.page .service-card ,
body.single-services .single-service-wrapper ,
body.single-services .service-card {
  /* background: #000; */
  background: #232a35;
  font-size: 1.1rem;

}
body.page .single-service-card ,
body.single-services .single-service-card {
  border: unset;
}

.single-service-card:hover {
  border-color: var(--border);
  transform: none;
}

.service-card__cta {
  display: inline-block;
  align-self: flex-start; /* .service-card is a flex column — keep the button its own width */
  margin-top: 12px;
  padding: 12px 28px;
  background: var(--accent);
  color: #0d1117;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.25s, transform 0.25s;
}

.service-card__cta:hover {
  background: #79b8ff;
  transform: translateY(-2px);
}

.hero__content--center {
  margin: 0 auto;
}

.hero--single-service {
  /* min-height: auto; */
}

.services-section__heading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.services-section .services-section__heading {
  margin-top: 48px;
}

/* ---------------- Infinite Carousel Track ---------------- */

.carousel-track {
  display: flex;
  gap: 24px;
  padding: 0 24px 32px;
  will-change: transform;
  position: relative;
}

/* The track transform and scroll direction are driven by carousel.js. */

/* Hide the track completely when there are no services */
.carousel-track.noServices {
  display: none;
}

/* Desktop & up: the track is swipe-able with a mouse or trackpad
   (carousel.js). `pan-y` keeps vertical page scrolling working while
   the script takes over horizontal gestures. Phones (≤640px) keep
   the default touch behaviour — there the track scrolls natively. */

@media (min-width: 641px) {
  .carousel-track {
    touch-action: pan-y;
    cursor: grab;
  }

  .carousel-track.is-dragging {
    -webkit-user-select: none;
    user-select: none;
    cursor: grabbing;
  }

  .carousel-track.is-dragging img {
    -webkit-user-drag: none;
  }
}

/* ---------------- Service Card ---------------- */

.service-card {
  flex: 0 0 30vw;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s, transform 0.25s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------------- Carousel Controls (arrows) ---------------- */

.carousel-controls {
  position: absolute;
  top: 0; /* Set by carousel-controls.js to the card centre. */
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 5;
  pointer-events: none;
}

.carousel-btn--prev {
  margin-left: 12px;
}

.carousel-btn--next {
  margin-right: 12px;
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(22, 27, 34, 0.8);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 0.2s, background 0.2s;
}

.carousel-btn:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.12);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.carousel-dot:hover {
  background: var(--accent);
  opacity: 0.7;
}

/* Mobile: adjust controls */
@media (max-width: 640px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

.service-card__image-wrap {
    width: 100%;
    text-align: center;
}
.service-card__image {
  display: inline-block;
  width: auto;
  max-height: 300px;
  /* aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #161b22; */
}

.service-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--border);
  border-radius: 8px;
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

body.home h3.service-card__title ,
body.home h3.service-card__title a {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  width: 100%;
  text-align: center;
}
body.page .service-card__title ,
body.single-services .service-card__title {
  font-size: 3.25rem;
  margin: 0 auto 30px;
  text-align: center;
}

body.single-services .card__content ul li {
  margin-top: 10px;
  margin-bottom: 10px;
}

body.single-services .services-image {
  width: 25%;
  height: auto;
  float: left;
  margin: 0 1rem 1rem;
}

.service-card__excerpt {
  margin: 0;
  font-size: 1.5rem;
  /* font-size: 0.9rem; */
  line-height: 1.6;
  color: var(--muted);
  flex-grow: 1;
}
body.home .service-card__excerpt {
  text-align: center;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: 4px;
  transition: gap 0.2s;
}

.service-card__link:hover {
  gap: 10px;
}

.service-card__link-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.service-card:hover .service-card__link-arrow {
  transform: translateX(3px);
}

/* No-services placeholder */
.no-services {
  text-align: center;
  color: var(--muted);
  padding: 48px 24px;
  font-size: 1rem;
}

.site-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--border);
  background: #0d1117
}
.site-footer__inner {
  text-align: center;
}
.site-footer__privacy {
  float: left;
  padding-left: 1rem;
}
.site-footer__terms {
  float: right;
  padding-right: 1rem;
}

/* ---------------- More from TL3 (home page) ---------------- */

.tl3-network {
  padding: 8px 24px 120px;
}

.tl3-network__inner {
  max-width: 880px;
  margin: 0 auto;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.tl3-network__title {
  margin: 0 0 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.tl3-network__blurb {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.6;
}

.tl3-network__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}

.tl3-network__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.tl3-network__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tl3-network__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.tl3-network__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tl3-network__name {
  font-weight: 700;
  color: #ffffff;
}

.tl3-network__desc {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 640px) {
  .hero {
    min-height: 400px;
  }

  .hero__content {
    padding: 48px 16px 0px;
  }

  .hero__title {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  /* CodeFlow is too dense behind the hero copy on narrow screens; it also
     costs too much to animate on phones. Keep the plain hero gradient. */
  .hero__bg {
    display: none;
  }

  .hero__sub {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .services-section {
    position: relative;
    padding: 40px 0 60px;
    transform: none;
  }

  .services-section .services-section__heading {
    margin-top: 0;
  }

  .single-service-wrapper {
    padding: 0 16px;
    width: 90vw;
    max-width: 90vw;
    margin: 0 auto;
  }

  .single-service-card {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0 16px;
  }

  .service-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }
  
  .service-card__excerpt {
    font-size: 1.25rem;
  }

  /* Mobile: one card at a time, native horizontal scrolling. */
  .carousel-track {
    width: auto;
    overflow-x: auto;
    padding: 0 16px 24px;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .carousel-track::-webkit-scrollbar {
    height: 6px;
  }

  .carousel-track::-webkit-scrollbar-track {
    background: transparent;
  }

  .carousel-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }

  /* Mobile: adjust controls */
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .carousel-dots {
    padding: 0 12px;
  }

  section#hero {
    margin-bottom: 3rem;
  }
  /* Footer: stack the links under the copyright and center everything. */
  .site-footer__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 8px 0;
    padding: 0 16px;
  }

  .site-footer__privacy,
  .site-footer__terms {
    float: none;
    padding: 0;
  }

  .tl3-network {
    padding: 0 16px 160px;
  }

  .tl3-network__inner {
    padding-top: 36px;
  }

  .tl3-network__links {
    grid-template-columns: 1fr;
  }

  .tl3-network__link {
    padding: 16px;
  }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  /* Static code lines would still clutter the hero copy, so drop the
     background entirely instead of just freezing the animation. */
  .hero__bg {
    display: none;
  }

  .service-card:hover {
    transform: none;
  }
}

/* ============================================================
   Contact Form (page-contact-us.php)
   ============================================================ */

.contact-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 0 8px;
}

.contact-intro {
  max-width: 640px;
  margin: 0 auto 28px;
}

.contact-form__field {
  margin: 0 0 18px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

/* Honeypot — off-screen so it is never seen or tabbed to, but still part
   of the form: bots that fill every field get a fake success and are dropped. */
.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__status {
  min-height: 1.5em;
  margin: 4px 0 12px;
  font-size: 0.9rem;
}

.contact-form__status--error {
  color: #f85149;
}

.contact-form__status--sending {
  color: var(--muted);
}

.contact-form__submit {
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  color: #0d1117;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-form__submit:hover {
  opacity: 0.85;
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.contact-success {
  text-align: center;
  padding: 24px 0;
}

/* The `hidden` attribute is display:none via the UA sheet, but any author
   `display` rule would override it — keep the hidden state explicit. */
.contact-success[hidden] {
  display: none;
}

.contact-success h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #ffffff;
}

.contact-success p {
  margin: 0;
  color: var(--muted);
}

.contact-fallback {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-fallback__link {
  color: var(--accent);
  font-weight: 600;
}

.contact-fallback__link:hover {
  text-decoration: underline;
}

/* ============================================================
   Billing / Signup (page-signup.php, page-login.php, page-account.php)
   Dark-panel restyle of the old tl3-signup UI on top of the
   contact-page shell (hero + codeFlow + single-service-wrapper).
   ============================================================ */

.billing-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 8px 8px;
}

.billing-intro {
  margin: 0 0 20px;
  color: var(--muted);
}

.billing-form__field {
  margin: 0 0 18px;
}

.billing-panel label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.billing-form input[type="text"],
.billing-form input[type="email"],
.billing-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.billing-form input[type="text"]:focus,
.billing-form input[type="email"]:focus,
.billing-form input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.billing-form input::placeholder {
  color: var(--muted);
}

.billing-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Honeypot — off-screen so it is never seen or tabbed to, but still part
   of the form: bots that fill every field are dropped server-side. */
.billing-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Service picker (checkbox cards) */
.billing-services {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
}

.billing-services legend {
  padding: 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.billing-service {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.billing-service:last-child {
  margin-bottom: 0;
}

.billing-service input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.billing-service:hover {
  border-color: var(--accent);
}

.billing-service:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.billing-service__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.billing-service__name {
  font-weight: 600;
  color: var(--text);
}

.billing-service__desc {
  font-size: 0.875rem;
  color: var(--muted);
}

.billing-service__price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.billing-total {
  margin: 0 0 18px;
  font-weight: 600;
}

.billing-total [data-tl3-total] {
  margin-left: 8px;
  font-weight: 700;
  color: var(--accent);
}

.billing-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.billing-check input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.billing-form__actions {
  margin: 22px 0 0;
}

/* Buttons */
.billing-button {
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  color: #0d1117;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.billing-button:hover {
  background: #79b8ff;
  transform: translateY(-2px);
}

.billing-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.billing-button--danger {
  background: transparent;
  color: #f85149;
  border: 1px solid #f85149;
}

.billing-button--danger:hover {
  background: rgba(248, 81, 73, 0.12);
}

.billing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.billing-inline-form {
  display: inline;
  margin: 0;
}

/* Alerts + badges */
.billing-alert {
  padding: 12px 16px;
  margin: 0 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--text);
}

.billing-alert--error {
  border-color: #f85149;
  background: rgba(248, 81, 73, 0.1);
  color: #ffa19b;
}

.billing-statusline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.billing-badge {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(139, 148, 158, 0.08);
}

.billing-badge--active {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.5);
  background: rgba(63, 185, 80, 0.1);
}

.billing-badge--pending_payment {
  color: #d29922;
  border-color: rgba(210, 153, 34, 0.5);
  background: rgba(210, 153, 34, 0.1);
}

.billing-badge--expired {
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.5);
  background: rgba(248, 81, 73, 0.1);
}

.billing-badge--cancelled {
  color: var(--muted);
}

.billing-badge--suspended {
  color: #f0883e;
  border-color: rgba(240, 136, 62, 0.5);
  background: rgba(240, 136, 62, 0.1);
}

/* Account table */
.billing-subtitle {
  margin: 24px 0 12px;
  font-size: 1.05rem;
  color: var(--text);
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
}

.billing-table th,
.billing-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

.billing-table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.billing-table .billing-numeric {
  text-align: right;
}

.billing-table__total td {
  font-weight: 700;
  border-bottom: none;
}

.billing-muted {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.billing-muted a {
  color: var(--accent);
  font-weight: 600;
}

.billing-muted a:hover {
  text-decoration: underline;
}

/* One card per customer website (multi-website billing). */
.billing-website-card {
  margin: 0 0 24px;
  padding: 18px 18px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(139, 148, 158, 0.04);
}

.billing-website-card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--text);
}

.billing-website-card__title .billing-badge {
  margin-left: auto;
}

.billing-website-card--cancelled,
.billing-website-card--suspended {
  opacity: 0.75;
}

.billing-website-card .billing-actions {
  margin: 14px 0 8px;
}

/* The "add a website" form separates itself from the cards above. */
#tl3-add-website-form {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Core login form (wp_login_form) inside the billing panel.
   The form gets form_id="tl3-loginform" from the templates. */
.billing-panel #tl3-loginform label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.billing-panel #tl3-loginform input[type="text"],
.billing-panel #tl3-loginform input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.billing-panel #tl3-loginform input[type="text"]:focus,
.billing-panel #tl3-loginform input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.billing-panel #tl3-loginform .forgetmenot {
  margin: 0 0 14px;
}

.billing-panel #tl3-loginform .forgetmenot label {
  display: inline;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.billing-panel #tl3-loginform .submit {
  margin-top: 4px;
}

.billing-panel #tl3-loginform input[type="submit"] {
  width: auto;
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  color: #0d1117;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s;
}

.billing-panel #tl3-loginform input[type="submit"]:hover {
  background: #79b8ff;
}

@media (max-width: 640px) {
  .billing-panel {
    padding: 20px 0 4px;
  }

  .billing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-actions .billing-inline-form {
    width: 100%;
  }

  .billing-actions .billing-button {
    width: 100%;
  }
}
