/* ==========================================================================
   Public site: EyeVoip brand colours (navy + blue).

   The purchased template paints its brand with Bootstrap's "warning" utilities (amber). Rather than
   editing the template's own sheets, this layer, loaded last in App.razor, re-points the brand uses
   of those classes to the EyeVoip blue. Real warning UI (.alert-warning, .badge-warning, pending
   status) is left amber on purpose: status colours must not be confused with the brand colour.

   --brand       #1685ff  brand blue (large areas, accents on dark backgrounds)
   --brand-solid #1170e6  filled buttons / text on white (white-on-this is 4.9:1)
   --brand-deep  #0d5cc2  hover / pressed
   --brand-cyan  #27c2e8  complementary highlight
   ========================================================================== */

:root {
    --brand: #1685ff;
    --brand-solid: #1170e6;
    --brand-deep: #0d5cc2;
    --brand-cyan: #27c2e8;
}

.btn-warning,
.btn-warning.disabled,
.btn-warning:disabled {
    background-color: var(--brand-solid);
    border-color: var(--brand-solid);
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled).active,
.btn-warning:not(:disabled):not(.disabled):active,
.show > .btn-warning.dropdown-toggle {
    background-color: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #fff;
}

.btn-warning:focus,
.btn-warning.focus,
.btn-warning:not(:disabled):not(.disabled):active:focus {
    box-shadow: 0 0 0 0.2rem rgba(22, 133, 255, 0.5);
}

.btn-outline-warning {
    background-color: transparent;
    border-color: var(--brand-solid);
    color: var(--brand-solid);
}

.btn-outline-warning:hover,
.btn-outline-warning:not(:disabled):not(.disabled).active,
.btn-outline-warning:not(:disabled):not(.disabled):active,
.show > .btn-outline-warning.dropdown-toggle {
    background-color: var(--brand-solid);
    border-color: var(--brand-solid);
    color: #fff;
}

.btn-outline-warning:focus {
    box-shadow: 0 0 0 0.2rem rgba(22, 133, 255, 0.5);
}

.bg-warning {
    background-color: var(--brand-solid) !important;
}

a.bg-warning:focus,
a.bg-warning:hover,
button.bg-warning:focus,
button.bg-warning:hover {
    background-color: var(--brand-deep) !important;
}

.border-warning {
    border-color: var(--brand) !important;
}

/* Decorative icons / headings that use .text-warning as the brand accent. */
.text-warning {
    color: var(--brand) !important;
}

.singletitle span {
    background-color: var(--brand-solid);
}

.portfolio-info {
    border-right-color: var(--brand);
}

.portfolio-info i,
.metraj span {
    background-color: var(--brand);
}

.account_action form input[type="submit"] {
    background-color: var(--brand-solid);
}

.shop-item-icon,
.shop-empty-icon {
    background: rgba(22, 133, 255, 0.12);
    color: var(--brand-solid);
}

.shop-gateway input {
    accent-color: var(--brand-solid);
}

.shop-next-links i {
    color: var(--brand-solid);
}

/* The dark theme re-declares the amber on its own selectors; keep text on the blue buttons white. */
html[data-theme="dark"] .btn-warning,
html[data-theme="dark"] .btn-warning:hover,
html[data-theme="dark"] .btn-outline-warning:hover {
    color: #fff;
}

html[data-theme="dark"] .btn-outline-warning {
    border-color: var(--brand);
    color: var(--brand);
}

html[data-theme="dark"] .shop-item-icon,
html[data-theme="dark"] .shop-empty-icon,
html[data-theme="dark"] .shop-next-links i {
    color: var(--brand);
}

/* ---- Light theme: panels tinted from the palette ---- */

html:not([data-theme="dark"]) .bg-light,
html:not([data-theme="dark"]) .portfolio-info ul li {
    background-color: #f1f5f9 !important;
}

/* Article-card category chips: white text on the brand blue. */
.blog_style .card-body span a,
.blog_style .card-body span a:hover {
    color: #fff !important;
}

/* Bootstrap's own primary matches the brand, in both themes. */
.btn-primary {
    background-color: var(--brand-solid);
    border-color: var(--brand-solid);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--brand-solid);
    color: var(--brand-solid);
}

.btn-outline-primary:hover {
    background-color: var(--brand-solid);
    border-color: var(--brand-solid);
    color: #fff;
}

.bg-primary {
    background-color: var(--brand-solid) !important;
}

.text-primary {
    color: var(--brand-solid) !important;
}

html[data-theme="dark"] .text-primary {
    color: var(--brand) !important;
}

/* Header and footer logos: the header floats over the slider, so keep it legible on any image. */
.site-logo {
    max-height: 48px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* ---- Dark theme: the page components that ship their own white cards (scoped CSS) ----------
   Their rules hard-code #fff / light greys, which the global dark layer cannot reach by element,
   so the card classes are listed here. -------------------------------------------------- */

html[data-theme="dark"] :is(.blog-side, .site-post-side, .site-post-card, .docs-card, .docs-side, .docs-article,
    .docs-pager-card, .product-card, .product-panel, .product-offer, .site-faq, .blog-chip, .site-tag, .product-pill,
    .docs-kind-badge) {
    background: var(--sd-surface);
    border-color: var(--sd-border);
    color: var(--sd-text);
}

html[data-theme="dark"] :is(.blog-side, .site-post-side, .site-post-card, .docs-card, .docs-side, .docs-article,
    .product-card, .product-panel, .product-offer, .site-faq) :is(h1, h2, h3, h4, h5, h6, strong, summary) {
    color: var(--sd-text-strong);
}

html[data-theme="dark"] .blog-cats a,
html[data-theme="dark"] .docs-side a {
    color: var(--sd-text);
}

html[data-theme="dark"] .blog-cats a:hover {
    background: var(--sd-surface-2);
    color: var(--sd-text-strong);
}

html[data-theme="dark"] .blog-chip:hover {
    background: var(--sd-surface-2);
    color: var(--sd-text-strong);
}

/* ---- Light theme fixes ---------------------------------------------------------------------- */

/* Text on the brand-blue bands (the template's .bg-warning blocks, e.g. the consult CTA): always white. */
.bg-warning,
.bg-warning .text-dark:not(.btn),
.bg-warning :is(h1, h2, h3, h4, h5, h6, p):not(.btn) {
    color: #fff !important;
}

/* The home page's quote bar: Admin -> Logo & Branding sets a background and lettering colour per theme through the
   --cq-* custom properties (inline on the element); anything left unset keeps the brand blue / white above. The phone
   button is a .btn and keeps its own colours. */
html .cta-quote.bg-warning {
    background-color: var(--cq-bg-light, var(--brand-solid)) !important;
}

html .cta-quote.bg-warning :is(h1, h2, h3, h4, h5, h6, p):not(.btn) {
    color: var(--cq-text-light, #fff) !important;
}

html[data-theme="dark"] .cta-quote.bg-warning {
    background-color: var(--cq-bg-dark, var(--brand-solid)) !important;
}

html[data-theme="dark"] .cta-quote.bg-warning :is(h1, h2, h3, h4, h5, h6, p):not(.btn) {
    color: var(--cq-text-dark, #fff) !important;
}

/* ---- Header: a solid bar that follows the theme ----------------------------------------------
   The template floats the header over the slider with a black gradient and white lettering, which
   only works over a dark photo. Instead it is a normal bar: white in the light theme, navy in the
   dark theme, with the matching logo, so every page and scroll position reads the same. ------- */

header.main_header {
    position: relative !important;
}

.hdr-logo-on-light {
    display: none;
}

html header.main_header .menu_wrapper,
html header.main_header .menu_wrapper .bg-cudark {
    height: auto;
    background-image: none;
    background-color: #071525;
}

html:not([data-theme="dark"]) header.main_header .menu_wrapper,
html:not([data-theme="dark"]) header.main_header .menu_wrapper .bg-cudark {
    background-color: #fff;
}

@media (min-width: 1200px) {
    html:not([data-theme="dark"]) .of-body .my_sticky {
        box-shadow: 0 2px 14px rgba(7, 21, 37, 0.12);
    }
}

html:not([data-theme="dark"]) header.main_header {
    border-bottom: 1px solid #e3e8ef;
}

html:not([data-theme="dark"]) header.main_header .hdr-logo-on-dark {
    display: none;
}

html:not([data-theme="dark"]) header.main_header .hdr-logo-on-light {
    display: inline-block;
}

html:not([data-theme="dark"]) header.main_header .site-logo {
    filter: none;
}

/* Navy lettering on the white bar: info strip, menu, account links, icons, language pills. */
html:not([data-theme="dark"]) header.main_header :is(.text-white, .of-main-menu > ul > li > a, .account_action,
    .social-list a, .tophead a, .tophead i, .m_search i, .mobile-nav-button .icon-wrap i, .fal, .fab) {
    color: #071525 !important;
}

html:not([data-theme="dark"]) header.main_header .of-main-menu > ul > li:hover > a,
html:not([data-theme="dark"]) header.main_header .of-main-menu > ul > li.of-active-item > a,
html:not([data-theme="dark"]) header.main_header .of-main-menu > ul > li > a.current {
    color: var(--brand-solid) !important;
}

html:not([data-theme="dark"]) header.main_header .site-lang {
    border-color: rgba(7, 21, 37, 0.3);
    color: #071525;
}

html:not([data-theme="dark"]) header.main_header .site-lang[aria-pressed="true"] {
    background: var(--brand-solid);
    border-color: var(--brand-solid);
    color: #fff;
}

html:not([data-theme="dark"]) header.main_header .site-theme-toggle {
    border-color: rgba(7, 21, 37, 0.3);
    color: #071525;
}

/* The cart count badge keeps white text on the brand blue. */
html:not([data-theme="dark"]) header.main_header .badge,
html:not([data-theme="dark"]) header.main_header .badge * {
    color: #fff !important;
}

/* ---- Sign-in / register card (light theme) --------------------------------------------------
   Browser autofill paints its own grey-blue field with white text; keep fields white with navy text. */

html:not([data-theme="dark"]) .auth-card .form-control,
html:not([data-theme="dark"]) .auth-card .form-control:focus {
    background-color: #fff;
    border: 1px solid #cfd8e3;
    color: #071525;
}

html:not([data-theme="dark"]) .auth-card .form-control:-webkit-autofill,
html:not([data-theme="dark"]) .auth-card .form-control:-webkit-autofill:hover,
html:not([data-theme="dark"]) .auth-card .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #071525;
    caret-color: #071525;
}

html[data-theme="dark"] .auth-card .form-control:-webkit-autofill,
html[data-theme="dark"] .auth-card .form-control:-webkit-autofill:hover,
html[data-theme="dark"] .auth-card .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0d1b2e inset;
    -webkit-text-fill-color: #f1f5f9;
    caret-color: #f1f5f9;
}

.auth-card .btn-warning,
.auth-card .btn-warning:hover,
.auth-card .btn-warning:focus,
.auth-card .btn-warning * {
    color: #fff !important;
}

.auth-card input[type="checkbox"] {
    accent-color: var(--brand-solid);
}

/* ---- Form fields in the light theme ----------------------------------------------------------
   The template never gives .form-control a background, so the browser painted it from the OS colour
   scheme: with a dark OS the fields turned grey-black on the light page. Pin the scheme to the theme
   and give the fields an explicit white surface. ----------------------------------------------- */

html:not([data-theme="dark"]) {
    color-scheme: light;
}

html:not([data-theme="dark"]) :is(.form-control, input:not([type="checkbox"], [type="radio"], [type="range"], [type="submit"], [type="button"], [type="file"]), textarea, select) {
    background-color: #fff;
    color: #071525;
}

html:not([data-theme="dark"]) :is(.form-control, input, textarea)::placeholder {
    color: #7b8794;
}

/* ---------------------------------------------------------------------------
   Loading veil. Painted by the server (App.razor) while the Blazor circuit connects, then faded
   out by eyeVoipSite.hideSplash(). Pure CSS, so it shows before any script has run.
   --------------------------------------------------------------------------- */
#site-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    background: radial-gradient(circle at 50% 40%, #0f2547 0%, #07142a 70%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#site-splash.site-splash-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-splash-orb {
    position: absolute;
    width: 22rem;
    height: 22rem;
    max-width: 80vw;
    max-height: 80vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 133, 255, 0.28), rgba(39, 194, 232, 0) 70%);
    animation: site-splash-breathe 2.8s ease-in-out infinite;
}

.site-splash-logo {
    position: relative;
    width: 11rem;
    max-width: 55vw;
    height: auto;
    animation: site-splash-fade 1s ease both, site-splash-float 3s ease-in-out 1s infinite;
}

.site-splash-bar {
    position: relative;
    width: 9rem;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
}

.site-splash-bar span {
    position: absolute;
    inset-block: 0;
    width: 40%;
    border-radius: 3px;
    background: linear-gradient(90deg, #1685ff, #27c2e8);
    animation: site-splash-slide 1.3s ease-in-out infinite;
}

@keyframes site-splash-breathe {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes site-splash-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes site-splash-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes site-splash-slide {
    0% { inset-inline-start: -40%; }
    100% { inset-inline-start: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    #site-splash, #site-splash * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---- Desktop header drop-downs (Products, Resources) ----------------------------------------------------------------
   The template colours the panel and its links with selectors as specific as `.of-drop-down li.narrow .second .inner ul`
   (white panel, #312f2f links), which out-ranked the dark-theme overrides in site-dark.css and left a white panel with
   dark text on the navy header. These repeat the chain with the header in front so one rule per theme wins in both
   directions (RTL/LTR) and the panel always matches the bar it hangs from. */
header.main_header .of-drop-down li.has_sub .second {
    box-shadow: 0 12px 28px -10px rgba(7, 21, 37, 0.28);
}

html:not([data-theme="dark"]) header.main_header .of-drop-down li.has_sub .second .inner ul {
    background-color: #fff;
    border: 1px solid #e3e8ef;
}

html:not([data-theme="dark"]) header.main_header .of-drop-down li.has_sub .second .inner ul li a {
    color: #071525;
}

html:not([data-theme="dark"]) header.main_header .of-drop-down li.has_sub .second .inner ul li:hover > a,
html:not([data-theme="dark"]) header.main_header .of-drop-down li.has_sub .second .inner ul li a:focus-visible,
html:not([data-theme="dark"]) header.main_header .of-drop-down li.has_sub .second .inner ul li.current-menu-item > a {
    background-color: #eef5ff;
    color: #1685ff;
}

html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second {
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second .inner ul {
    background-color: #0d131a;
    border: 1px solid var(--sd-border);
}

html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second .inner ul li a {
    color: var(--sd-text);
}

html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second .inner ul li:hover > a,
html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second .inner ul li a:focus-visible,
html[data-theme="dark"] header.main_header .of-drop-down li.has_sub .second .inner ul li.current-menu-item > a {
    background-color: var(--sd-surface-2);
    color: #4aa3ff;
}

header.main_header .of-drop-down li.has_sub .second .inner ul li a:focus-visible {
    outline: 2px solid #1685ff;
    outline-offset: -2px;
}

/* The template's title strip centres its photo without sizing it, so on a wide screen the picture stopped short and the
   black tint behind it showed as a dark half. Cover the whole strip, in both directions. */
.banner_area {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Contact page social icons: brand-coloured tiles instead of the template's black ones (they vanished in the dark theme). */
.social .contact-social-icon {
    display: inline-block;
    width: 2.25rem;
    height: 2.25rem;
    margin-inline-end: 0.35rem;
    line-height: 2.25rem;
    text-align: center;
    color: #fff;
    background: var(--brand-solid, #1170e6);
    border-radius: 8px;
    transition: background-color 0.15s, transform 0.15s;
}

.social a:hover .contact-social-icon {
    background: var(--brand-deep, #0d5cc2);
    transform: translateY(-2px);
}

/* Contact page info icons: the template drew them black on the blue disc, and the dark theme swapped in a dark tile.
   White glyph on the brand blue in both themes. */
.contact-block h4 i {
    background: var(--brand-solid, #1170e6);
    color: #fff;
}

/* Bootstrap's .text-dark is !important, so a button written as "btn btn-warning text-dark" (amber in the template, blue
   here) kept dark lettering on the blue. Text and icon on every brand button stay white in both themes. */
.btn-warning.text-dark,
.btn-warning .text-dark,
.btn-warning :is(i, span, bdi, strong) {
    color: #fff !important;
}
