/* Container for the animation */
.success-animation {
    width: 180px;
    height: 180px;
    position: relative;
    margin: 30px auto 0 auto;
}

/* Circle */
.circle {
    width: 100%;
    height: 100%;
    border: 8px solid var(--bs-primary); /* Bootstrap's primary color variable */
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: scaleCircle 1s ease-in-out;
}

/* Checkmark */
.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100px;
    height: 100px;
    animation: drawCheckmark 0.5s ease-in-out 0.5s forwards;
}

.checkmark path {
    stroke: var(--bs-primary); /* Bootstrap's primary color variable */
    stroke-width: 8;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawPath 0.5s ease-in-out 0.5s forwards;
}

/* Keyframes for the circle scaling */
@keyframes scaleCircle {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Keyframes for the checkmark scaling */
@keyframes drawCheckmark {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Keyframes for the checkmark path drawing */
@keyframes drawPath {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

/* Container for the error animation */
.error-animation {
    width: 180px;
    height: 180px;
    position: relative;
    margin: 30px auto 0 auto;
}

/* Circle for error */
.error-animation .circle {
    width: 100%;
    height: 100%;
    border: 8px solid var(--bs-danger); /* Bootstrap's danger color variable */
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: scaleCircle 1s ease-in-out;
}

/* Crossmark (X) */
.error-animation .crossmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100px;
    height: 100px;
    animation: drawCrossmark 0.5s ease-in-out 0.5s forwards;
}

.error-animation .crossmark path {
    stroke: var(--bs-danger); /* Bootstrap's danger color variable */
    stroke-width: 8;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawPath 0.5s ease-in-out 0.5s forwards;
}

/* Keyframes for the circle scaling */
@keyframes scaleCircle {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Keyframes for the crossmark scaling */
@keyframes drawCrossmark {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Keyframes for the crossmark path drawing */
@keyframes drawPath {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

/* ==== SOLARIS: correcoes de modo escuro (fundos brancos fixos do tema) ==== */
[data-bs-theme="dark"] .card {
  --bs-card-bg: var(--bs-tertiary-bg, #2b3035);
  --bs-card-border-color: var(--bs-border-color, #495057);
}
[data-bs-theme="dark"] .amt-group,
[data-bs-theme="dark"] .quick-card,
[data-bs-theme="dark"] .product,
[data-bs-theme="dark"] .invoice-container,
[data-bs-theme="dark"] .gw-item,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .offcanvas {
  background-color: var(--bs-tertiary-bg, #2b3035) !important;
  color: var(--bs-body-color, #dee2e6);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--bs-secondary-bg, #343a40) !important;
  color: var(--bs-body-color, #dee2e6) !important;
  border-color: var(--bs-border-color, #495057) !important;
}
[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  color: var(--bs-body-color, #dee2e6);
}
[data-bs-theme="dark"] .text-dark {
  color: var(--bs-body-color, #dee2e6) !important;
}

/* ==== SOLARIS: titulos e breadcrumb no modo escuro ==== */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: var(--bs-body-color, #dee2e6);
}
[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="dark"] .breadcrumb-item a {
  color: var(--bs-body-color, #dee2e6) !important;
}

/* ==== SOLARIS: dropdowns customizados (menu SERVICOS, menu de conta) no modo escuro ==== */
[data-bs-theme="dark"] .gsm-dropdown {
  background-color: var(--bs-tertiary-bg, #2b3035) !important;
}
[data-bs-theme="dark"] .gsm-dropdown a {
  color: var(--bs-body-color, #dee2e6) !important;
  opacity: 1 !important;
}
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .dropdown-wrapper,
[data-bs-theme="dark"] .dropdown-wrapper .dropdown-menu {
  background-color: var(--bs-tertiary-bg, #2b3035) !important;
}
[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .dropdown-wrapper a,
[data-bs-theme="dark"] .dropdown-menu a {
  color: var(--bs-body-color, #dee2e6) !important;
  opacity: 1 !important;
}
[data-bs-theme="dark"] .text-muted {
  color: var(--bs-secondary-color, #adb5bd) !important;
  opacity: 1 !important;
}

/* ==== SOLARIS: estados de hover/active/danger nos itens de dropdown (modo escuro) ==== */
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .dropdown-wrapper a:hover {
  background-color: var(--bs-secondary-bg, #343a40) !important;
  color: var(--bs-body-color, #dee2e6) !important;
}
[data-bs-theme="dark"] .dropdown-item.text-danger,
[data-bs-theme="dark"] .dropdown-wrapper a.text-danger,
[data-bs-theme="dark"] .bg-danger-subtle {
  background-color: var(--bs-danger-bg-subtle, #2c0b0e) !important;
  color: var(--bs-danger-text-emphasis, #ea868f) !important;
}
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light-subtle {
  background-color: var(--bs-secondary-bg, #343a40) !important;
}

/* ==== SOLARIS: variaveis --pc-* do template (nao seguiam o modo escuro) ==== */
[data-bs-theme="dark"] {
  --pc-heading-color: var(--bs-body-color, #dee2e6);
  --pc-active-background: var(--bs-secondary-bg, #343a40);
  --pc-sidebar-color: var(--bs-body-color, #dee2e6);
  --pc-sidebar-active-color: var(--bs-primary, #6ea8fe);
  --pc-sidebar-caption-color: var(--bs-secondary-color, #adb5bd);
  --pc-sidebar-border: 1px dashed var(--bs-border-color, #495057);
  --pc-sidebar-user-background: var(--bs-tertiary-bg, #2b3035);
  --pc-header-color: var(--bs-body-color, #dee2e6);
  --pc-header-submenu-background: var(--bs-tertiary-bg, #2b3035);
  --pc-header-submenu-color: var(--bs-body-color, #dee2e6);
}

/* ==== SOLARIS: efeito de borda ao passar o mouse no grupo ==== */
.solaris-group-block:hover {
  border-color: var(--bs-primary, #f97316) !important;
  background-color: rgba(0,0,0,0.02);
}
[data-bs-theme="dark"] .solaris-group-block:hover {
  background-color: rgba(255,255,255,0.03);
}

/* ==== SOLARIS: efeito hover nos cards de servico ==== */
#service-list a.card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#service-list a.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
  border-color: var(--bs-primary, #f97316);
}

/* ==== SOLARIS: --bs-light-primary (usado inline em paineis) no modo escuro ==== */
[data-bs-theme="dark"] {
  --bs-light-primary: var(--bs-tertiary-bg, #2b3035);
}

/* ==== SOLARIS: familia bg-light-* (badges suaves) no modo escuro ==== */
[data-bs-theme="dark"] .bg-light-primary { background: var(--bs-primary-bg-subtle, #031633) !important; color: var(--bs-primary-text-emphasis, #6ea8fe) !important; }
[data-bs-theme="dark"] .bg-light-secondary { background: var(--bs-secondary-bg-subtle, #161719) !important; color: var(--bs-secondary-text-emphasis, #a7acb1) !important; }
[data-bs-theme="dark"] .bg-light-success { background: var(--bs-success-bg-subtle, #051b11) !important; color: var(--bs-success-text-emphasis, #75b798) !important; }
[data-bs-theme="dark"] .bg-light-info { background: var(--bs-info-bg-subtle, #032830) !important; color: var(--bs-info-text-emphasis, #6edff6) !important; }
[data-bs-theme="dark"] .bg-light-warning { background: var(--bs-warning-bg-subtle, #332701) !important; color: var(--bs-warning-text-emphasis, #ffda6a) !important; }
[data-bs-theme="dark"] .bg-light-danger { background: var(--bs-danger-bg-subtle, #2c0b0e) !important; color: var(--bs-danger-text-emphasis, #ea868f) !important; }
[data-bs-theme="dark"] .bg-light-light { background: var(--bs-tertiary-bg, #2b3035) !important; color: var(--bs-body-color, #dee2e6) !important; }

/* ==== SOLARIS: badge de preco verde claro com letra preta (so no modo escuro) ==== */
[data-bs-theme="dark"] .badge.bg-light-primary {
  background-color: #86efac !important;
  color: #000000 !important;
}

/* ==== SOLARIS: faixa de texto rolando no topo ==== */
.solaris-text-ticker {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(270deg, #2563eb, #3b82f6, #1d4ed8, #38bdf8, #2563eb);
  background-size: 400% 400%;
  animation: solarisTickerGradient 10s ease infinite;
  padding: 4px 0;
  position: relative;
  z-index: 999;
}
.solaris-text-ticker__inner {
  display: inline-block;
  white-space: nowrap;
  animation: solarisTickerScroll 24s linear infinite;
  color: #fff;
  font-weight: 600;
  padding-left: 100%;
  font-size: 0.75rem;
  letter-spacing: .3px;
}
@keyframes solarisTickerScroll {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}
@keyframes solarisTickerGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==== MOBIX: mantem a cor da marca (preto) mesmo no modo escuro ==== */
[data-bs-theme="dark"] {
  --bs-primary: #131920 !important;
  --bs-primary-rgb: 19, 25, 32 !important;
}

/* ==== MOBIX: brilho suave passando na logo (vai e volta) ==== */
.nav-logo{
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.nav-logo::before{
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: solarisLogoShine 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes solarisLogoShine{
  0%   { left: -75%; }
  45%  { left: 125%; }
  55%  { left: 125%; }
  100% { left: -75%; }
}

/* ==== MOBIX: aumenta a logo, com crescimento minimo da barra do menu ==== */
.gsm-theme-header {
  min-height: 66px !important;
}
.nav-logo .logo {
  height: 66px !important;
  max-height: 66px !important;
  width: auto !important;
  max-width: none !important;
}

/* ==== MOBIX: brilho recortado na propria forma da logo (mask-image) ==== */
.nav-logo::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background-image: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.95) 50%, transparent 65%);
  background-size: 300% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  -webkit-mask-image: url('/media/d7a27cd7-277a-4e50-a184-ff77b6d3b7f5.png');
  mask-image: url('/media/d7a27cd7-277a-4e50-a184-ff77b6d3b7f5.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mix-blend-mode: screen;
  animation: solarisLogoShineMask 2.4s ease-in-out infinite alternate;
}
@keyframes solarisLogoShineMask {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
