/* ====
   MARTISTAR COOKIE BANNER - GDPR COMPLIANT
   Premium Dark Design - Olive Green Theme v1.2
   ==== */

/* Overlay */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cookie-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Main Banner Container - MUST be higher than overlay */
.cookie-banner {
  position: fixed;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%) scale(0.95);
  width: 94%;
  max-width: 540px;
  max-height: 90vh;
  background: linear-gradient(145deg, rgba(15, 30, 22, 0.98), rgba(10, 20, 15, 0.98));
  border: 1px solid rgba(140, 200, 170, 0.15);
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(140, 200, 170, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cookie-banner.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 50%) scale(1);
}

/* Inner scrollable content */
.cookie-banner-inner {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Header with Logo and Language Selector */
.cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.cookie-logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(140, 200, 170, 0.3));
  transition: transform 0.3s ease;
}

.cookie-logo:hover {
  transform: scale(1.05);
}

.cookie-title {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 0 15px rgba(140, 200, 170, 0.3);
}

/* Language Selector */
.cookie-lang-selector {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cookie-lang-btn {
  padding: 5px 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(200, 220, 210, 0.7);
  background: rgba(50, 80, 65, 0.3);
  border: 1px solid rgba(140, 200, 170, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-lang-btn:hover {
  background: rgba(70, 110, 90, 0.4);
  color: #fff;
}

.cookie-lang-btn.active {
  background: linear-gradient(135deg, rgba(140, 200, 170, 0.3), rgba(107, 157, 132, 0.3));
  color: #fff;
  border-color: rgba(140, 200, 170, 0.5);
  box-shadow: 0 0 10px rgba(140, 200, 170, 0.2);
}

/* Main Text */
.cookie-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(200, 220, 210, 0.85);
  margin-bottom: 16px;
}

.cookie-text p {
  margin: 0 0 8px 0;
}

.cookie-text p:last-child {
  margin-bottom: 0;
}

/* Links in text */
.cookie-link {
  color: #8cc8aa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cookie-link:hover {
  color: #a8dcc0;
  text-shadow: 0 0 8px rgba(140, 200, 170, 0.4);
}

/* Buttons Container */
.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cookie-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cookie-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.cookie-btn:hover::before {
  left: 100%;
}

/* Accept All - Primary (Olive Green) */
.cookie-btn-accept {
  background: linear-gradient(135deg, #6b9d84, #5a8a73);
  color: #fff;
  box-shadow: 0 3px 15px rgba(107, 157, 132, 0.3);
}

.cookie-btn-accept:hover {
  background: linear-gradient(135deg, #7aac93, #6b9d84);
  box-shadow: 0 5px 20px rgba(107, 157, 132, 0.45);
  transform: translateY(-2px);
}

/* Reject - Secondary */
.cookie-btn-reject {
  background: rgba(60, 80, 70, 0.5);
  color: rgba(200, 220, 210, 0.9);
  border: 1px solid rgba(140, 200, 170, 0.25);
}

.cookie-btn-reject:hover {
  background: rgba(80, 100, 90, 0.6);
  color: #fff;
}

/* Preferences - Tertiary */
.cookie-btn-prefs {
  background: transparent;
  color: #8cc8aa;
  border: 1px solid rgba(140, 200, 170, 0.3);
}

.cookie-btn-prefs:hover {
  background: rgba(140, 200, 170, 0.1);
  border-color: rgba(140, 200, 170, 0.5);
}

/* ====
   PREFERENCES PANEL
   ==== */

.cookie-preferences {
  display: none;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(140, 200, 170, 0.15);
}

.cookie-preferences.active {
  display: block;
}

.cookie-category {
  background: rgba(40, 60, 50, 0.35);
  border: 1px solid rgba(140, 200, 170, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.cookie-category:last-of-type {
  margin-bottom: 0;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cookie-category-name {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.4px;
}

.cookie-category-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(180, 200, 190, 0.75);
  margin-top: 6px;
  margin-bottom: 0;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(60, 80, 70, 0.5);
  border: 1px solid rgba(140, 200, 170, 0.2);
  border-radius: 22px;
  transition: all 0.3s ease;
}

.cookie-toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 2px;
  background: rgba(180, 210, 195, 0.9);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(135deg, rgba(107, 157, 132, 0.6), rgba(90, 138, 115, 0.6));
  border-color: rgba(140, 200, 170, 0.4);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(19px);
  background: #fff;
  box-shadow: 0 0 8px rgba(140, 200, 170, 0.5);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Always On Badge */
.cookie-always-on {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(140, 200, 170, 0.9);
  background: rgba(140, 200, 170, 0.15);
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Save Preferences Button */
.cookie-btn-save {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, #6b9d84, #5a8a73);
  color: #fff;
  box-shadow: 0 3px 15px rgba(107, 157, 132, 0.3);
}

.cookie-btn-save:hover {
  background: linear-gradient(135deg, #7aac93, #6b9d84);
  box-shadow: 0 5px 20px rgba(107, 157, 132, 0.45);
  transform: translateY(-2px);
}

/* ====
   RESPONSIVE DESIGN
   ==== */

@media (max-width: 600px) {
  .cookie-banner {
    width: 96%;
    max-height: 92vh;
    border-radius: 14px;
  }
  
  .cookie-banner-inner {
    padding: 16px 18px;
  }
  
  .cookie-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }
  
  .cookie-logo {
    width: 32px;
    height: 32px;
  }
  
  .cookie-title {
    font-size: 1rem;
  }
  
  .cookie-lang-selector {
    width: 100%;
    justify-content: flex-start;
  }
  
  .cookie-lang-btn {
    flex: 1;
    text-align: center;
    padding: 6px 5px;
    font-size: 0.65rem;
  }
  
  .cookie-text {
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 12px;
  }
  
  .cookie-text p {
    margin: 0 0 6px 0;
  }
  
  .cookie-buttons {
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
  }
  
  .cookie-btn {
    min-width: 100%;
    padding: 10px 12px;
    font-size: 0.78rem;
  }
  
  .cookie-preferences {
    margin-top: 12px;
    padding-top: 12px;
  }
  
  .cookie-category {
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  
  .cookie-category-name {
    font-size: 0.8rem;
  }
  
  .cookie-category-desc {
    font-size: 0.72rem;
    margin-top: 5px;
  }
  
  .cookie-btn-save {
    margin-top: 10px;
  }
}

@media (max-width: 380px) {
  .cookie-banner-inner {
    padding: 14px 14px;
  }
  
  .cookie-logo {
    width: 28px;
    height: 28px;
  }
  
  .cookie-title {
    font-size: 0.9rem;
  }
  
  .cookie-text {
    font-size: 0.75rem;
  }
  
  .cookie-btn {
    padding: 9px 10px;
    font-size: 0.75rem;
  }
}

/* Focus States for Accessibility */
.cookie-btn:focus,
.cookie-lang-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-link:focus {
  outline: 2px solid rgba(140, 200, 170, 0.6);
  outline-offset: 2px;
}

/* Scrollbar Styling */
.cookie-banner-inner::-webkit-scrollbar {
  width: 5px;
}

.cookie-banner-inner::-webkit-scrollbar-track {
  background: rgba(30, 50, 40, 0.3);
  border-radius: 3px;
}

.cookie-banner-inner::-webkit-scrollbar-thumb {
  background: rgba(140, 200, 170, 0.4);
  border-radius: 3px;
}

.cookie-banner-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 200, 170, 0.6);
}
