/* ─── Cookie Consent Widget Styles ─── */

.cc-banner * {
  box-sizing: border-box !important;
}

.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #333;
  color: #fff;
  padding: 16px 24px;
  z-index: 10000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  font-size: 14px;
  line-height: 1.5;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.cc-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cc-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-banner p {
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 60% !important;
  min-width: 240px !important;
  color: #fff !important;
  line-height: 1.5 !important;
}

.cc-prefs-close {
  position: absolute;
  top: -4px;
  right: 0;
  background: none;
  border: none;
  color: #ccc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.cc-prefs-close:hover {
  color: #fff;
}

.cc-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cc-btn {
  padding: 8px 18px !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: opacity 0.2s !important;
  font-family: inherit !important;
  line-height: normal !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.cc-btn:hover {
  opacity: 0.9 !important;
}

.cc-btn--primary {
  background: #4CAF50 !important;
  color: #fff !important;
}

.cc-btn--secondary {
  background: #666 !important;
  color: #fff !important;
}

.cc-btn--link {
  background: transparent !important;
  color: #ccc !important;
  text-decoration: underline !important;
  padding: 8px 12px !important;
}

.cc-btn--link:hover {
  color: #fff;
}

/* ─── Mandatory Backdrop ─── */
.cc-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  backdrop-filter: blur(3px);
}

/* ─── Modal Overlay ─── */

.cc-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.cc-modal--hidden {
  display: none !important;
}

.cc-modal-card {
  background: #fff;
  color: #333;
  border-radius: 8px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px 32px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.cc-modal-card h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
}

/* ─── Category Toggles ─── */

.cc-category {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}

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

.cc-category-header label {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.cc-category-desc {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: #666;
}

/* ─── Toggle Switch ─── */

.cc-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.cc-toggle input {
  display: none;
}

.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 26px;
  transition: background 0.3s, box-shadow 0.3s;
}

.cc-toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.3s;
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #4CAF50;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(22px);
}

.cc-toggle input:focus-visible + .cc-toggle-slider {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}

.cc-toggle--disabled {
  opacity: 0.6;
}

.cc-toggle--disabled .cc-toggle-slider {
  cursor: not-allowed;
}

/* ─── Cookie Details Table ─── */

.cc-cookies-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 10px !important;
  font-size: 13px !important;
  background: transparent !important;
  margin-bottom: 0 !important;
}

.cc-cookies-table th,
.cc-cookies-table td {
  text-align: left !important;
  padding: 6px 8px !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
}

.cc-cookies-table th {
  font-weight: 600;
  color: #555;
}

/* ─── Modal Footer ─── */

.cc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.cc-modal-footer a {
  margin-right: auto;
  font-size: 13px;
  color: #4CAF50;
  text-decoration: underline;
  align-self: center;
}

.cc-modal-footer a:hover {
  color: #388E3C;
}

/* ─── Floating Settings Button ─── */

.cc-settings-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  border: 2px solid #555;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}

.cc-settings-btn:hover {
  transform: scale(1.1);
}

.cc-settings-btn--visible {
  display: flex;
}

/* ─── Print Hide ─── */

@media print {
  .cc-banner,
  .cc-modal,
  .cc-settings-btn {
    display: none !important;
  }
}

/* ─── Mobile ─── */

@media (max-width: 480px) {
  .cc-banner {
    padding: 12px 16px;
  }
  .cc-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  .cc-banner-actions .cc-btn--primary {
    width: 100%;
  }
  .cc-banner-actions .cc-btn--secondary,
  .cc-banner-actions .cc-btn--link {
    flex: 1;
    text-align: center;
  }
}


/* ─── Preferences Inline (Banner) ─── */
.cc-banner-prefs {
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
  max-height: 60vh;
  overflow-y: auto;
  opacity: 1;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, border 0.3s ease;
}
.cc-banner-prefs--hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  border-top-width: 0;
  overflow: hidden;
  display: block !important;
}
.cc-banner-prefs h2 {
  font-size: 18px;
  margin: 0 0 16px 0;
  position: relative;
}
.cc-category {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.2);
}
.cc-category-desc {
  color: #ccc;
}
.cc-cookies-table th, .cc-cookies-table td {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #ddd;
}
.cc-cookies-table th {
  color: #fff;
}
.cc-banner-prefs-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.cc-banner-prefs-footer a {
  margin-right: auto;
  font-size: 13px;
  color: #4CAF50;
  text-decoration: underline;
  align-self: center;
}
.cc-banner-prefs-footer a:hover {
  color: #388E3C;
}
