/* ==========================================================================
   endcorecloud.net — custom additions (dark mode + theme/language switcher)
   Written as plain CSS so it does not depend on the pre-built Tailwind file.
   ========================================================================== */

html.dark {
  --color-white: #0f172a;
  --color-light-50: #0f172a;
  --color-light-100: #1a2740;
  --color-light-200: #22314d;
  --color-light-300: #34405c;
  --color-dark-500: #97a3b8;
  --color-dark-600: #b6c0d1;
  --color-dark-700: #d3dae6;
  --color-dark-800: #e9edf3;
  --color-dark-900: #f8fafc;
  --color-black: #1e2a44;
  --color-primary-50: #17233d;
  --color-primary-100: #1c2c4b;
}

html.dark body,
html.dark #main-content {
  background-color: var(--color-white);
}

html.dark #preloader {
  background-color: #0f172a;
}

html.dark .dmca-badge img {
  filter: brightness(0.9);
}

/* Theme / language switch buttons in the header */
.ec-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--color-light-300);
  background-color: var(--color-light-200);
  color: var(--color-dark-700);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ec-switch-btn:hover {
  background-color: var(--color-light-300);
}

.ec-switch-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.ec-theme-icon-dark { display: none; }
html.dark .ec-theme-icon-light { display: none; }
html.dark .ec-theme-icon-dark { display: block; }

.ec-header-switches {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ec-mobile-switches {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

/* ==========================================================================
   Order / client area modal
   ========================================================================== */

.ec-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ec-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.ec-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.ec-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 30rem;
  padding: 2rem;
  border-radius: 1.75rem;
  border: 1px solid var(--color-light-300);
  background-color: var(--color-white);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.ec-modal.is-open .ec-modal__dialog {
  transform: translateY(0) scale(1);
}

.ec-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.75rem;
  background-color: transparent;
  color: var(--color-dark-500);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.ec-modal__close:hover {
  background-color: var(--color-light-200);
  color: var(--color-dark-900);
}

.ec-modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ec-modal__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-dark-900);
  margin: 0 2.25rem 0.5rem 0;
}

.ec-modal__subtitle {
  color: var(--color-dark-600);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.ec-modal__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ec-modal__option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-light-300);
  border-radius: 1.15rem;
  background-color: var(--color-light-100);
  text-decoration: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

.ec-modal__option:hover {
  border-color: var(--color-primary-500);
  background-color: var(--color-white);
  transform: translateY(-2px);
}

.ec-modal__icon {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background-color: var(--color-primary-100);
  color: var(--color-primary-500);
}

.ec-modal__icon svg,
.ec-modal__icon img {
  width: 1.4rem;
  height: 1.4rem;
}

.ec-modal__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.ec-modal__option-title {
  font-weight: 600;
  color: var(--color-dark-900);
}

.ec-modal__option-desc {
  font-size: 0.82rem;
  color: var(--color-dark-500);
  line-height: 1.4;
}

.ec-modal__arrow {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--color-dark-500);
}

html.dark .ec-modal__backdrop {
  background-color: rgba(2, 6, 23, 0.7);
}

/* ==========================================================================
   Dark mode readability fixes
   --------------------------------------------------------------------------
   `--color-white` is remapped for backgrounds in dark mode, which would also
   drag `.text-white` down to the page background colour. These rules keep
   white text (and the solid CTA buttons) readable.
   ========================================================================== */

html.dark .text-white,
html.dark .hover\:text-white:hover {
  color: #f8fafc;
}

html.dark .bg-black {
  background-color: var(--color-primary-500);
}

html.dark .hover\:bg-black:hover,
html.dark .hover\:bg-neutral-700:hover {
  background-color: var(--color-primary-600);
}

html.dark .border-black {
  border-color: var(--color-primary-500);
}

/* Monochrome social glyphs are invisible on a dark background */
html.dark img.footer-social {
  filter: brightness(0) invert(1);
}

/* The wordmark is wide; shrink it on phones so it can't collide with the
   theme / language / burger buttons in the header bar. */
.ec-header-logo { height: 1.55rem; width: auto; }

@media (min-width: 768px) {
  .ec-header-logo { height: 2.5rem; }
}

/* Compact variant used in the mobile header bar */
.ec-switch-btn--sm {
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0 0.45rem;
  gap: 0.25rem;
  border-radius: 0.65rem;
  font-size: 0.75rem;
}

.ec-switch-btn--sm svg {
  width: 1rem;
  height: 1rem;
}

/* Flags ------------------------------------------------------------------ */

.ec-lang-flag {
  width: 1.15rem;
  height: 0.85rem;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

html.dark .ec-lang-flag,
html.dark #location-toggle-flag,
html.dark .location-option img {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Brand logos that are dark by design need a light plate on dark backgrounds */
html.dark img.pay-logo-mono {
  background-color: #f8fafc;
  border-radius: 0.4rem;
  padding: 0.2rem 0.35rem;
}

html.dark .ec-modal__icon img {
  filter: brightness(0) invert(1);
}

/* Inline links (FAQ answers, footer) ------------------------------------- */

.ec-link {
  color: var(--color-primary-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.25s ease;
  word-break: break-word;
}

.ec-link:hover {
  color: var(--color-primary-600);
}

html.dark .ec-link {
  color: #5aa9ff;
}

html.dark .ec-link:hover {
  color: #8cc4ff;
}

.faq-answer a {
  color: var(--color-primary-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

html.dark .faq-answer a {
  color: #5aa9ff;
}

/* ==========================================================================
   Utility classes missing from the pre-built Tailwind bundle
   (styles.css was generated before these were used in the markup)
   ========================================================================== */

.align-middle { vertical-align: middle; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.object-contain { object-fit: contain; }
.pt-1 { padding-top: 0.25rem; }

/* ==========================================================================
   Text logo lockup (replaces img/logo.svg)
   ========================================================================== */

.ec-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ec-logo__brand { color: var(--color-primary-500); }
.ec-logo__suffix { color: var(--color-dark-900); }

.ec-logo--header { font-size: 1.25rem; }
.ec-logo--footer { font-size: 1.4rem; }

.ec-logo--preloader {
  font-size: clamp(1.75rem, 8vw, 3.25rem);
}

@media (min-width: 768px) {
  .ec-logo--header { font-size: 1.6rem; }
}
