/* ============================================================
   WEBSHIELD — COMPONENTS.CSS
   Loading Screen · Cookie Banner · WhatsApp · Back to Top
   ============================================================ */

/* ===== 1. LOADING SCREEN ===== */
#ws-loader {
  position: fixed;
  inset: 0;
  background: #020c1b;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#ws-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-shield {
  width: 80px;
  height: 80px;
  margin-bottom: 28px;
  animation: loader-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(0, 245, 255, 0.5));
}
@keyframes loader-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.loader-logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00f5ff;
  letter-spacing: 3px;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}
.loader-tagline {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.68rem;
  color: #5a8ba0;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(0, 245, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f5ff, #0a84ff);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
  animation: loader-progress 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes loader-progress {
  0%   { width: 0%; }
  30%  { width: 35%; }
  60%  { width: 70%; }
  85%  { width: 88%; }
  100% { width: 100%; }
}
.loader-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 245, 255, 0.012) 3px,
    rgba(0, 245, 255, 0.012) 4px
  );
  pointer-events: none;
}
/* Prevent scroll while loading */
body.loading { overflow: hidden; }

/* ===== 2. COOKIE CONSENT BANNER ===== */
#ws-cookie {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 99998;
  width: calc(100% - 48px);
  max-width: 780px;
  background: rgba(5, 18, 38, 0.97);
  border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0,245,255,0.05);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
  opacity: 0;
}
#ws-cookie.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
#ws-cookie.hide {
  transform: translateX(-50%) translateY(140px);
  opacity: 0;
}
.cookie-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  filter: grayscale(0.2);
}
.cookie-text { flex: 1; }
.cookie-text p {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.84rem;
  color: #7a9cb0;
  line-height: 1.6;
  margin: 0;
}
.cookie-text p a {
  color: #00f5ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 245, 255, 0.3);
  transition: border-color 0.2s;
}
.cookie-text p a:hover { border-color: #00f5ff; }
.cookie-text strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  color: #dff4ff;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 5px;
}
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn-accept {
  padding: 9px 20px;
  background: linear-gradient(135deg, #00f5ff, #0a84ff);
  color: #020c1b;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.cookie-btn-accept:hover {
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.4);
  transform: translateY(-1px);
}
.cookie-btn-decline {
  padding: 9px 16px;
  background: transparent;
  color: #5a8ba0;
  font-family: 'Exo 2', sans-serif;
  font-size: 0.82rem;
  border: 1px solid rgba(0, 245, 255, 0.12);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.cookie-btn-decline:hover {
  border-color: rgba(0, 245, 255, 0.3);
  color: #dff4ff;
}
@media (max-width: 640px) {
  #ws-cookie { flex-direction: column; text-align: center; padding: 18px; bottom: 16px; width: calc(100% - 32px); }
  .cookie-actions { width: 100%; justify-content: center; }
  .cookie-btn-accept, .cookie-btn-decline { flex: 1; }
}

/* ===== 3. WHATSAPP FLOATING BUTTON ===== */
#ws-whatsapp {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.wa-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 18, 38, 0.95);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 40px;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  transform: translateX(80px);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.wa-bubble.visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.wa-bubble:hover {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.2), 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.wa-bubble-text {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dff4ff;
  white-space: nowrap;
}
.wa-main-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s;
  position: relative;
  animation: wa-pulse 3s ease-in-out infinite;
  text-decoration: none;
}
.wa-main-btn:hover {
  background: #20b858;
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
  animation: none;
}
.wa-main-btn svg { width: 28px; height: 28px; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50%       { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}
.wa-tooltip {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 18, 38, 0.95);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  color: #25D366;
  letter-spacing: 1.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.wa-main-btn:hover .wa-tooltip { opacity: 1; }
@media (max-width: 768px) {
  #ws-whatsapp { bottom: 80px; right: 16px; }
  .wa-main-btn { width: 50px; height: 50px; }
}

/* ===== 4. BACK TO TOP BUTTON ===== */
#ws-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9989;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(5, 18, 38, 0.92);
  border: 1px solid rgba(0, 245, 255, 0.18);
  color: #00f5ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
#ws-back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
#ws-back-top:hover {
  background: rgba(0, 245, 255, 0.12);
  border-color: rgba(0, 245, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.25);
  transform: translateY(-3px);
}
#ws-back-top svg {
  width: 18px;
  height: 18px;
  stroke: #00f5ff;
  transition: transform 0.2s;
}
#ws-back-top:hover svg { transform: translateY(-2px); }
@media (max-width: 768px) {
  #ws-back-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* ===== TAWK.TO OVERRIDE (style the chat widget) ===== */
/* Force Tawk iframe to match site colors */
iframe#tawkchat-minified-iframe-element,
iframe#tawkchat-status-iframe-element {
  bottom: 90px !important;
}