/* ==============================================
   OS Flag Portugal — Cookie Consent Styles
   Shared across osflag.pt and mundodasbandeiras.pt
   ============================================== */

/* ── Banner (bottom bar) ── */
#cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #d9dee7;
  box-shadow: 0 -4px 20px rgba(16,24,32,0.09);
  padding: 18px 32px;
  z-index: 9000;
  font-family: 'Urbanist', Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.cc-banner-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1;
  min-width: 220px;
}

.cc-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  display: block;
  margin-bottom: 4px;
}

.cc-banner-text p {
  margin: 0;
  color: #5b6472;
  font-size: 13.5px;
  font-weight: 400;
}

.cc-banner-text a {
  color: #2d4b63;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner-text a:hover { text-decoration: none; }

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

/* ── Buttons ── */
.cc-btn {
  display: inline-block;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid #2d4b63;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
  background: transparent;
  color: #2d4b63;
  border-radius: 0;
}

.cc-btn:hover { background: #2d4b63; color: #fff; }
.cc-btn:focus-visible { outline: 3px solid #2d4b63; outline-offset: 2px; }
.cc-btn:active { transform: scale(0.98); }

/* Accept — filled, equal weight to reject */
.cc-btn-primary { background: #2d4b63; color: #fff; }
.cc-btn-primary:hover { background: #1e3448; border-color: #1e3448; }

/* Manage — subtle */
.cc-btn-subtle {
  border-color: #d9dee7;
  color: #5b6472;
  font-weight: 500;
  font-size: 13px;
}
.cc-btn-subtle:hover { border-color: #2d4b63; color: #2d4b63; background: transparent; }

/* ── Modal overlay ── */
#cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,24,32,0.55);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#cc-modal-overlay[hidden] { display: none; }

#cc-modal {
  background: #fff;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  outline: none;
}

.cc-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #5b6472;
  line-height: 1;
  padding: 6px 10px;
  font-family: inherit;
}
.cc-modal-close:hover { color: #111827; }
.cc-modal-close:focus-visible { outline: 3px solid #2d4b63; outline-offset: 2px; }

.cc-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  padding-right: 36px;
}

.cc-modal-desc {
  font-size: 14px;
  color: #5b6472;
  margin: 0 0 24px;
  line-height: 1.6;
  font-weight: 400;
}

/* ── Category rows ── */
.cc-category {
  border-top: 1px solid #d9dee7;
  padding: 18px 0;
}

.cc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cc-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.cc-always-on {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2d4b63;
  background: #eef2f6;
  padding: 3px 10px;
  white-space: nowrap;
}

.cc-category-desc {
  font-size: 13.5px;
  color: #5b6472;
  margin: 0;
  line-height: 1.55;
  font-weight: 400;
}

/* ── Toggle switch ── */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-slider {
  position: absolute;
  inset: 0;
  background: #d9dee7;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 26px;
}

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

.cc-toggle input:checked + .cc-slider { background: #2d4b63; }
.cc-toggle input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-toggle input:disabled + .cc-slider { opacity: 0.5; cursor: not-allowed; }
.cc-toggle input:focus-visible + .cc-slider { outline: 3px solid #2d4b63; outline-offset: 3px; border-radius: 26px; }

/* ── Modal buttons ── */
.cc-modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.cc-modal-buttons .cc-btn { flex: 1; text-align: center; min-width: 120px; }

/* ── Footer link ── */
.cc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  margin-top: 8px;
}

.cc-footer-links span { color: #d9dee7; }
.cc-footer-links a { color: #5b6472; font-weight: 400; text-decoration: none; }
.cc-footer-links a:hover { text-decoration: underline; color: #2d4b63; }
#cc-open-settings { font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 640px) {
  #cc-banner { padding: 16px 20px; }
  .cc-banner-actions { width: 100%; }
  .cc-banner-actions .cc-btn { flex: 1 1 calc(50% - 4px); text-align: center; }
  .cc-banner-actions .cc-btn-subtle { flex-basis: 100%; }
  #cc-modal { padding: 28px 20px 24px; }
  .cc-modal-buttons { flex-direction: column; }
  .cc-modal-buttons .cc-btn { min-width: 0; }
}

@media (max-width: 360px) {
  .cc-banner-actions .cc-btn { flex-basis: 100%; }
}
