@import "tailwindcss";

@source "../../includes/cookiemanagement/**/*.php";

/** @format */

/* ========================================
   ADMIN STYLES
   ======================================== */

/* .sp-cookie-description {
  font-style: italic;
  color: #666;
  font-size: 12px;
  margin-top: 3px;
} */

.cookie-category-admin {
  margin-bottom: 20px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
  background: #fff;
}

.cookie-category-admin .hndle {
  margin: 0;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
}

/* textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
} */

.cookie-category-admin .inside {
  padding: 15px;
}

.cookie-list,
.scripts-list {
  margin-top: 15px;
  margin-bottom: 20px;
}

.add-cookie,
.add-script {
  margin-top: 10px;
}

.add-category-wrap {
  margin-top: 20px;
  margin-bottom: 20px;
}

.cookie-category-admin h4 {
  margin-top: 25px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

/* ========================================
   FRONTEND BANNER STYLES
   ======================================== */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 9998;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.cookie-consent-banner.active {
  display: block;
}

.cookie-consent-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-consent-content {
  margin-bottom: 20px;
}

.cookie-consent-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.cookie-consent-text {
  margin-bottom: 15px;
}

.cookie-consent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ========================================
   SETTINGS PANEL (MODAL)
   ======================================== */

.cookie-consent-settings {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  overflow-y: auto;
}

.cookie-consent-settings.active {
  display: block;
}

/* Overlay background */
.cookie-consent-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(0 0 0 / 50%);
  /*z-index: -1;*/
}

/* Prevent body scroll when modal is open */
body.cookie-settings-open {
  overflow: hidden;
}

.cookie-consent-settings-inner {
  position: relative;
  max-width: 800px;
  margin: 50px auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgb(0 0 0 / 20%);
  z-index: 1; 
}

/* Header with close button */
.cookie-consent-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.cookie-consent-settings-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  padding-right: 40px;
}

/* Close button (X) in header */
.cookie-consent-settings-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
  padding: 0;
}

.cookie-consent-settings-close:hover {
  background-color: #e0e0e0;
  color: #333;
}

.cookie-consent-settings-close:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.cookie-consent-settings-description {
  margin-bottom: 20px;
  color: #666;
}

/* ========================================
   COOKIE CATEGORIES
   ======================================== */

.cookie-categories {
  margin-bottom: 30px;
}

.cookie-category {
  margin-bottom: 15px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.cookie-category-title-wrap {
  display: flex;
  flex: 1;
}

.cookie-category-checkbox {
  margin-right: 10px;
}

.cookie-category-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.cookie-category-toggle {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  transition: transform 0.2s;
  padding: 5px 10px;
}

.cookie-category.expanded .cookie-category-toggle .toggle-icon {
  display: inline-block;
  transform: rotate(180deg);
}

.cookie-category-content {
  padding: 0 15px;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.cookie-category.expanded .cookie-category-content {
  max-height: 1000px;
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

.cookie-category-description {
  margin-bottom: 20px;
}

/* ========================================
   COOKIE TABLES
   ======================================== */

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.cookie-table th,
.cookie-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.cookie-table th {
  font-weight: 600;
  background-color: #f5f5f5;
}

/* Screen reader only caption */
.cookie-table caption.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   FOOTER BUTTONS
   ======================================== */

.cookie-consent-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 2px solid #efefef;
}

/* Close button in footer */
.cookie-consent-settings-close-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cookie-consent-tabs {
  border-top: 2px solid #efefef;
  border-bottom: 2px solid #efefef;
}
.cookie-consent-settings-close-btn:hover {
  background-color: #e0e0e0;
}

.cookie-consent-save-preferences {
  display: inline-block;
  padding: 10px 20px;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* ========================================
   COOKIE SETTINGS ICON
   ======================================== */

.cookie-settings-icon {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9997;
  background: #444;
  border: none;
  padding: 10px;
  margin: 0;
  outline: none;
  border-radius: 50%;
  transition: background-color 0.2s, transform 0.2s;
}

.cookie-settings-icon:hover {
  background: #333;
  transform: scale(1.05);
}

.cookie-settings-icon:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.cookie-settings-icon.position-left {
  left: 10px;
  right: auto;
}

.cookie-settings-icon.position-right {
  right: 10px;
  left: auto;
}

.cookie-settings-icon svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* .cookie-settings-icon #triangle path {
  fill: #444;
}

.cookie-settings-icon #circle path {
  fill: #fff;
}

.cookie-settings-icon:hover #triangle path {
  fill: #333;
} */

/* ========================================
   ADMIN: ICON POSITION SETTING
   ======================================== */

.cookie-icon-position-setting {
  margin: 30px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.cookie-icon-position-setting h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.cookie-icon-position-setting p {
  margin-bottom: 15px;
  color: #666;
}

.position-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.position-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  transition: background-color 0.2s;
}

.position-options label:hover {
  background-color: #f5f5f5;
}

.position-options input[type="radio"] {
  margin-right: 10px;
}

/* ========================================
   ADMIN: SCRIPT DETAILS
   ======================================== */

.script-details {
  margin-top: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.script-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.script-details label {
  display: block;
  margin-bottom: 5px;
}

.cookie-script-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.script-type-badge {
  background-color: #f0f0f0;
  color: #333;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  text-transform: uppercase;
}

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

@media screen and (max-width: 992px) {
  .script-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 768px) {
  .cookie-consent-settings-inner {
    margin: 20px;
    padding: 20px;
  }

  .cookie-consent-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-settings-icon {
    width: 40px;
    height: 40px;
    padding: 5px;
  }

  .cookie-settings-icon svg {
    width: 24px;
    height: 24px;
  }

  .script-controls {
    grid-template-columns: 1fr;
  }

  .cookie-consent-settings-footer {
    flex-direction: column;
  }

  .cookie-consent-settings-footer button {
    width: 100%;
  }

  .cookie-table {
    font-size: 12px;
  }

  .cookie-table th,
  .cookie-table td {
    padding: 8px 5px;
  }
}

/* Banner show/hide */
.cookie-consent-banner { display: none; }
.cookie-consent-banner.active { display: block; }

/* Settings modal show/hide */
.cookie-consent-settings {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cookie-consent-settings.active { display: flex; }

.cookie-consent-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;             /* keep it behind the modal */
}

.cookie-consent-settings-inner {
    position: relative;
    z-index: 1;             /* lift modal above overlay */
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Tab visibility — Tailwind's hidden class is overridden when tab is active */
.cookie-consent-tab-panel { display: none; }
.cookie-consent-tab-panel.active { display: flex; max-height: 500px; }

body.cookie-settings-open { overflow: hidden; }

.purple-bg {
  background:  #4b5890;
}

.about-tab a {
  color: #4b5890;
  font-weight: bold;
}
.text-indigo-600 {
  color: #4b5890;
}
.border-indigo-600 {
  border-bottom: 4px solid #4b5890;
}
.cookie-category .toggle-icon {
  margin-top: 2px;
    transition: transform 0.2s ease;
}

.cookie-category:has(.cookie-category-content.hidden) .toggle-icon {
    transform: rotate(-0deg);
}
.cookie-category:has(.cookie-category-content) .toggle-icon {
    transform: rotate(-180deg);
}
.cookie-consent-tab-body {
  max-height: 500px;
  overflow-y:scroll;
}
.number-bg {
  background: #e2e2e2;
  border-radius: 30px 30px;
  padding: 0.25rem;
  justify-content: center;
  width:25px;
}
.cookie-item {
   background-color: rgba(0, 0, 0, 0.05);
}

/* Cookie consent toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle .cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cookie-toggle .cookie-toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider {
    background-color: #4b5890;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle input[type="checkbox"]:focus-visible + .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.cookie-toggle input[type="checkbox"]:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle input[type="checkbox"]:disabled:checked + .cookie-toggle-slider {
    background-color: #4b5890;
}