/* ==========================================
   STEWARDDEV CLOUD - MODERN UI STYLES
   ========================================== */

:root {
  --ui-primary: #2563eb;
  --ui-primary-hover: #1d4ed8;
  --ui-navy: #0f172a;
  --ui-text: #334155;
  --ui-muted: #64748b;
  --ui-surface: #ffffff;
  --ui-border: #e2e8f0;
  --ui-success: #16a34a;
  --ui-danger: #dc2626;
  --ui-radius: 14px;
  --ui-shadow: 0 16px 45px rgba(15, 23, 42, 0.14);
}

/* TEXT SELECTION */
::selection {
  background: #2563eb;
  color: #ffffff;
}

/* THEME COLOR */
.base-color {
  color: hsl(var(--main)) !important;
}

/* ==========================================
   COPY BUTTON
   ========================================== */

.copyInput {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 40px;
  height: 40px;
  line-height: 1;
  text-align: center;
  font-size: 16px;
  color: var(--ui-primary);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.copyInput:hover {
  background: var(--ui-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.copyInput:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* COPY SUCCESS ANIMATION */

.copied::after {
  position: absolute;
  top: 8px;
  right: 12%;
  min-width: 90px;
  padding: 9px 14px;
  content: "✓ Copied!";
  color: #ffffff;
  background: var(--ui-success);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  animation: showcopied 1.5s ease forwards;
}

@keyframes showcopied {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  75% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

/* ==========================================
   COOKIE CONSENT CARD
   ========================================== */

.cookies-card {
  width: min(460px, calc(100% - 30px));
  padding: 26px;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999999;

  color: var(--ui-text);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  box-shadow: var(--ui-shadow);

  transition:
    bottom 0.4s ease,
    opacity 0.4s ease,
    transform 0.4s ease;
}

.cookies-card.hide {
  bottom: -500px !important;
  opacity: 0;
  pointer-events: none;
}

.radius--10px {
  border-radius: 10px;
}

/* COOKIE ICON */

.cookies-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;

  color: var(--ui-primary);
  background: #eff6ff;
  font-size: 27px;
}

/* COOKIE DESCRIPTION */

.cookies-card__content {
  margin-bottom: 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* COOKIE BUTTONS */

.cookies-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  margin: 5px 5px 0 0;

  color: var(--ui-primary);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.cookies-btn:hover {
  background: #dbeafe;
  color: var(--ui-primary-hover);
  transform: translateY(-1px);
}

.cookies-btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* PRIMARY COOKIE BUTTON
   Add .cookies-btn--primary to Accept */

.cookies-btn--primary {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #ffffff;
}

.cookies-btn--primary:hover {
  background: var(--ui-primary-hover);
  color: #ffffff;
}

/* ==========================================
   INPUT VALIDATION POPUP
   ========================================== */

.hover-input-popup {
  position: relative;
}

.input-popup {
  display: none;
}

.hover-input-popup .input-popup {
  display: block;
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  width: min(280px, 90vw);
  padding: 18px 20px;
  z-index: 50;

  color: #ffffff;
  background: var(--ui-navy);
  border: 1px solid #334155;
  border-radius: 12px;

  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);
  transform: translateX(-50%);
  animation: popupEnter 0.25s ease both;
}

@keyframes popupEnter {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* POPUP ARROW */

.input-popup::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--ui-navy);
  border-right: 1px solid #334155;
  border-bottom: 1px solid #334155;
  transform: translateX(-50%) rotate(45deg);
}

/* VALIDATION ITEMS */

.input-popup p {
  position: relative;
  margin: 0 0 10px;
  padding-left: 24px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.input-popup p:last-child {
  margin-bottom: 0;
}

.input-popup p::before {
  position: absolute;
  left: 0;
  top: 2px;
  font-family: "Line Awesome Free";
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.input-popup p.error {
  color: #fca5a5;
  text-decoration: line-through;
}

.input-popup p.error::before {
  content: "\f057";
  color: #f87171;
}

.input-popup p.success {
  color: #86efac;
}

.input-popup p.success::before {
  content: "\f058";
  color: #4ade80;
}

/* ==========================================
   RESPONSIVE FILTERS
   ========================================== */

.show-filter {
  display: none;
}

@media (max-width: 767px) {

  .cookies-card {
    width: calc(100% - 24px);
    left: 12px;
    bottom: 12px;
    padding: 20px;
    border-radius: 16px;
  }

  .cookies-btn {
    padding: 11px 18px;
  }

  .copyInput {
    width: 38px;
    height: 38px;
  }

  .copied::after {
    top: 45px;
    right: 0;
  }

  .responsive-filter-card {
    display: none;
    transition: none;
  }

  .responsive-filter-card.is-open {
    display: block;
  }

  .show-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;

    background: var(--ui-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  .show-filter:hover {
    background: var(--ui-primary-hover);
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .copyInput,
  .cookies-card,
  .cookies-btn,
  .input-popup,
  .show-filter {
    transition: none;
    animation: none;
  }
}