/**
 * Cookie Consent Plugin for Joomla
 * Developed by Casa Rei Technology & Services LLC
 * (C) 2026 Casa Rei Technology & Services LLC. All rights reserved.
 * https://rei.casa
 */

:root {
  --cc-bg-color: #346885;
  --cc-text-color: #ffffff;
  --cc-link-color: #F5C870;
  --cc-btn-accept-bg: #F5C870;
  --cc-btn-accept-text: #2C566F;
  --cc-btn-decline-bg: transparent;
  --cc-btn-decline-text: #ffffff;
  --cc-font-family: inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --cc-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --cc-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --cc-z-index: 999999;
}

.cc-banner-wrapper {
  position: fixed;
  z-index: var(--cc-z-index);
  background-color: var(--cc-bg-color);
  color: var(--cc-text-color);
  font-family: var(--cc-font-family);
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: var(--cc-shadow);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  pointer-events: none;
}

.cc-banner-wrapper *,
.cc-banner-wrapper *::before,
.cc-banner-wrapper *::after {
  box-sizing: border-box;
}

/* Visibility states */
.cc-banner-wrapper.cc-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 1. Position: Bottom Bar */
.cc-banner-wrapper.cc-pos-bottom-bar {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1.25rem 2rem;
  transform: translateY(100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-banner-wrapper.cc-pos-bottom-bar.cc-visible {
  transform: translateY(0);
}

/* 2. Position: Top Bar */
.cc-banner-wrapper.cc-pos-top-bar {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1.25rem 2rem;
  transform: translateY(-100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-banner-wrapper.cc-pos-top-bar.cc-visible {
  transform: translateY(0);
}

/* 3. Position: Floating Card Bottom Right */
.cc-banner-wrapper.cc-pos-floating-card-bottom-right {
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 440px;
  width: calc(100% - 3rem);
  padding: 1.5rem;
  border-radius: 14px;
  transform: translateY(40px) scale(0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cc-banner-wrapper.cc-pos-floating-card-bottom-right.cc-visible {
  transform: translateY(0) scale(1);
}

/* 4. Position: Floating Card Bottom Left */
.cc-banner-wrapper.cc-pos-floating-card-bottom-left {
  bottom: 1.5rem;
  left: 1.5rem;
  max-width: 440px;
  width: calc(100% - 3rem);
  padding: 1.5rem;
  border-radius: 14px;
  transform: translateY(40px) scale(0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cc-banner-wrapper.cc-pos-floating-card-bottom-left.cc-visible {
  transform: translateY(0) scale(1);
}

/* Layout Container */
.cc-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.cc-pos-floating-card-bottom-right .cc-container,
.cc-pos-floating-card-bottom-left .cc-container {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

/* Content Area */
.cc-content {
  flex: 1 1 auto;
  color: var(--cc-text-color);
}

.cc-text {
  margin: 0;
}

.cc-banner-wrapper .cc-privacy-link,
.cc-banner-wrapper .cc-content a {
  color: var(--cc-link-color) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: opacity 0.2s ease;
  margin-left: 0.35rem;
  display: inline-block;
}

.cc-banner-wrapper .cc-privacy-link:hover,
.cc-banner-wrapper .cc-privacy-link:focus-visible,
.cc-banner-wrapper .cc-content a:hover,
.cc-banner-wrapper .cc-content a:focus-visible {
  color: var(--cc-link-color) !important;
  opacity: 0.85;
  text-decoration: none !important;
}

/* Actions & Buttons */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cc-pos-floating-card-bottom-right .cc-actions,
.cc-pos-floating-card-bottom-left .cc-actions {
  width: 100%;
  justify-content: flex-end;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  line-height: 1.2;
  text-decoration: none;
  transition: var(--cc-transition);
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.cc-btn:focus-visible {
  outline: 3px solid var(--cc-link-color);
  outline-offset: 2px;
}

.cc-banner-wrapper .cc-btn-accept {
  background-color: var(--cc-btn-accept-bg) !important;
  color: var(--cc-btn-accept-text) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.cc-banner-wrapper .cc-btn-accept:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.cc-banner-wrapper .cc-btn-accept:active {
  transform: translateY(1px);
}

.cc-banner-wrapper .cc-btn-decline {
  background-color: var(--cc-btn-decline-bg) !important;
  color: var(--cc-btn-decline-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.cc-banner-wrapper .cc-btn-decline:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

.cc-banner-wrapper .cc-btn-decline:active {
  transform: translateY(1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cc-banner-wrapper.cc-pos-bottom-bar,
  .cc-banner-wrapper.cc-pos-top-bar {
    padding: 1.25rem 1rem;
  }

  .cc-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cc-actions {
    width: 100%;
    flex-direction: row-reverse;
  }

  .cc-btn {
    flex: 1 1 50%;
    text-align: center;
    padding: 0.75rem 1rem;
  }

  .cc-banner-wrapper.cc-pos-floating-card-bottom-right,
  .cc-banner-wrapper.cc-pos-floating-card-bottom-left {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    padding: 1.25rem;
  }
}
