/* ================================
   🌈 LifeRoute Modernized Styles
   Upgraded Copy Animation + UI Polish
   ================================== */

/* ========== VARIABLES ========== */
:root {
  /* Primary Theme Colors */
  --color-primary-h: 246;
  --color-primary-s: 78%;
  --color-primary-l: 58%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));

  --color-secondary: hsl(213, 100%, 14%);
  --color-light: hsl(0, 0%, 100%);
  --color-dark: hsl(0, 0%, 15%);
  --color-gray: hsl(0, 0%, 65%);
  --color-success: #28c76f;
  --color-error: #ea5455;
  --color-warning: #ff9f43;

  /* Shadows, Transitions, Spacing */
  --radius-small: 4px;
  --radius-medium: 10px;
  --radius-round: 999px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --shadow-light: 0 3px 8px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ========== THEME SUPPORT ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-light: hsl(213, 20%, 12%);
    --color-dark: hsl(0, 0%, 95%);
    --color-gray: hsl(0, 0%, 45%);
    --shadow-light: 0 3px 8px rgba(255, 255, 255, 0.05);
  }

  body {
    background-color: var(--color-light);
    color: var(--color-dark);
  }

  .cookies-card {
    background: rgba(35, 35, 35, 0.9);
    color: #fff;
  }
}

/* ========== GLOBAL SETTINGS ========== */
* {
  transition: background-color var(--transition-medium),
              color var(--transition-medium),
              border-color var(--transition-fast);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== COPY BUTTON ANIMATION ========== */
.copyInput {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  font-size: 15px;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: all var(--transition-medium);
  color: var(--color-dark);
}

.copyInput:hover {
  background: var(--color-primary);
  color: #fff;
}

.copied::after {
  position: absolute;
  top: -35px;
  right: 10px;
  padding: 5px 12px;
  border-radius: var(--radius-small);
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.9em;
  content: "Copied!";
  opacity: 0;
  animation: fadeSlideUp 1.4s ease forwards;
}

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(10px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(-5px); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ========== COOKIES CARD ========== */
.cookies-card {
  width: 480px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-light);
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 9999;
  backdrop-filter: blur(8px);
  transition: all var(--transition-medium);
}

.cookies-card.hide {
  bottom: -500px !important;
}

.cookies-card__icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
}

.cookies-btn {
  color: #fff;
  background: var(--color-primary);
  padding: 10px 35px;
  margin: 5px;
  display: inline-block;
  border-radius: var(--radius-round);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.cookies-btn:hover {
  background: hsl(var(--color-primary-h), var(--color-primary-s), calc(var(--color-primary-l) + 8%));
}

/* Responsive */
@media (max-width: 767px) {
  .cookies-card {
    width: 100%;
    left: 0;
    bottom: 0;
    border-radius: 0;
    font-size: 14px;
  }
}

/* ========== HOVER POPUP (VALIDATION TOOLTIP) ========== */
.hover-input-popup {
  position: relative;
}

.hover-input-popup .input-popup {
  position: absolute;
  display: none;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: #1a1a1a;
  color: #fff;
  padding: 15px;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-heavy);
}

.hover-input-popup:hover .input-popup {
  display: block;
  animation: fadeSlideUp 0.4s ease forwards;
}

.input-popup::after {
  position: absolute;
  content: "";
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #1a1a1a transparent;
}

.input-popup p {
  padding-left: 28px;
  position: relative;
  font-size: 14px;
  margin: 8px 0;
}

.input-popup p.error::before {
  content: "\f057";
  color: var(--color-error);
  font-family: "Line Awesome Free";
  font-weight: 900;
  position: absolute;
  left: 0;
}

.input-popup p.success::before {
  content: "\f058";
  color: var(--color-success);
  font-family: "Line Awesome Free";
  font-weight: 900;
  position: absolute;
  left: 0;
}

/* ========== STAR RATING SYSTEM ========== */
.rating .rating-form-group {
  position: relative;
  font-size: 24px;
  cursor: pointer;
}

.rating .star-label input {
  display: none;
}

.rating .star-label .icon {
  color: #ddd;
  transition: color var(--transition-fast);
}

.rating .star-label:hover ~ .star-label .icon,
.rating .rating-form-group input:checked ~ .icon {
  color: #ffc107;
}

/* ========== SELECT2 DROPDOWN STYLES ========== */
.select2-container--default .select2-selection--single {
  background: var(--color-light);
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-medium);
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--open .select2-selection--single {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.2);
}

.select2-dropdown {
  border: 0 !important;
  border-radius: var(--radius-medium) !important;
  box-shadow: var(--shadow-light);
  background: var(--color-light);
}

/* ========== LANGUAGE DROPDOWN ========== */
.dropdown-lang {
  margin-left: 30px;
}
.dropdown-lang .dropdown-menu {
  border-radius: var(--radius-medium);
  border: 1px solid #eee;
  background: var(--color-light);
  box-shadow: var(--shadow-light);
  padding: 10px;
}
.dropdown-lang .dropdown-menu a {
  display: block;
  font-size: 14px;
  padding: 6px;
  color: var(--color-dark);
  border-bottom: 1px solid #f3f3f3;
  transition: color var(--transition-fast);
}
.dropdown-lang .dropdown-menu a:hover {
  color: var(--color-primary);
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.rounded { border-radius: var(--radius-medium); }
.shadow { box-shadow: var(--shadow-light); }