/* clientscript/samcookieconsent.css */
/* Stile ispirato al banner/pannello cookie di wildout.eu: card scura fluttuante, box per
   categoria con icona e bordo, switch colorato, bottoni con gerarchia (outline/pieno). */

#samconsent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: 1100px;
  margin: 0 auto;
  background: #22222c;
  color: #e6e6ec;
  padding: 18px 22px;
  border: 1px solid #383844;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  animation: samconsent-slide-up 0.3s ease-out;
}

@keyframes samconsent-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.samconsent-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.samconsent-banner-body {
  flex: 1 1 380px;
}

.samconsent-banner-title {
  margin: 0 0 6px;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}

.samconsent-banner-text {
  margin: 0;
  line-height: 1.5;
  color: #c4c4cc;
}

.samconsent-banner-text a {
  color: #e0a030;
  text-decoration: underline;
}

.samconsent-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.samconsent-icon {
  display: inline-block;
}

/* Bottoni: gerarchia comune a banner e modale */
.samconsent-btn {
  border: 1px solid #555;
  background: transparent;
  color: #e6e6ec;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.samconsent-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #888;
}

.samconsent-btn-accept {
  background: #2e9e52;
  border-color: #2e9e52;
  color: #fff;
}

.samconsent-btn-accept:hover {
  background: #268044;
  border-color: #268044;
}

.samconsent-btn-accept-outline {
  background: transparent;
  border-color: #2e9e52;
  color: #4cc776;
}

.samconsent-btn-accept-outline:hover {
  background: rgba(46, 158, 82, 0.12);
}

.samconsent-btn-save {
  background: #e8b530;
  border-color: #e8b530;
  color: #26221a;
}

.samconsent-btn-save:hover {
  background: #d1a12a;
  border-color: #d1a12a;
}

/* Compatibilita' con markup/CSS precedenti che usavano solo .samconsent-btn-primary */
.samconsent-btn-primary {
  background: #2e9e52;
  border-color: #2e9e52;
  color: #fff;
}

#samconsent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  animation: samconsent-fade-in 0.2s ease-out;
}

@keyframes samconsent-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.samconsent-modal-dialog {
  max-width: 620px;
  margin: 50px auto;
  background: #22222c;
  color: #e6e6ec;
  border: 1px solid #383844;
  border-radius: 10px;
  padding: 24px 28px 26px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.samconsent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.samconsent-modal-title {
  margin: 0;
  font-size: 19px;
  color: #fff;
}

.samconsent-modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.samconsent-modal-close:hover {
  color: #fff;
}

.samconsent-modal-intro {
  font-size: 13px;
  line-height: 1.6;
  color: #b8b8c0;
  margin: 14px 0 18px;
}

.samconsent-modal-intro a {
  color: #e0a030;
  text-decoration: underline;
}

.samconsent-modal-category {
  background: #292933;
  border: 1px solid #3a3a46;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.samconsent-modal-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}

.samconsent-modal-category-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.samconsent-modal-category-desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b8b8c0;
  line-height: 1.5;
}

.samconsent-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  justify-content: flex-end;
}

/* Interruttore on/off (switch) al posto della semplice checkbox */
.samconsent-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.samconsent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.samconsent-switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.samconsent-switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.samconsent-switch input:checked + .samconsent-switch-slider {
  background-color: #3d7dff;
}

.samconsent-switch input:checked + .samconsent-switch-slider::before {
  transform: translateX(20px);
}

.samconsent-switch input:disabled + .samconsent-switch-slider {
  opacity: 0.55;
  cursor: not-allowed;
}

[data-consent-placeholder-for] {
  border: 1px dashed #999;
  padding: 16px;
  text-align: center;
  background: #f2f2f2;
}

.samconsent-video-message {
  margin: 0;
}

.samconsent-video-message a,
.samconsent-video-external a {
  color: #c20000;
  font-weight: bold;
  text-decoration: underline;
}

.samconsent-video-message a:hover,
.samconsent-video-external a:hover {
  color: #900;
}

.samconsent-video-external {
  border: 1px dashed #999;
  padding: 16px;
  text-align: center;
  background: #f2f2f2;
  margin: 0;
}

/* Pagina pubblica /cookiepolicy.php */
.samconsent-policy {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.samconsent-policy h1 {
  margin-bottom: 4px;
}

.samconsent-policy-intro {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 8px 0 20px;
}

.samconsent-policy-openbtn {
  margin: 0 0 28px;
}

.samconsent-policy-openbtn .samconsent-btn {
  background: #c20000;
  border-color: #c20000;
  color: #fff;
}

.samconsent-policy-openbtn .samconsent-btn:hover {
  background: #970000;
  border-color: #970000;
}

.samconsent-policy-section {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #c20000;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.samconsent-policy-section h5 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #c20000;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.samconsent-policy-section p {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 8px;
}

.samconsent-policy-controller dl {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.samconsent-policy-controller dt {
  font-weight: bold;
  color: #555;
}

.samconsent-policy-controller dd {
  margin: 0 0 8px;
}

.samconsent-policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.samconsent-policy-table th,
.samconsent-policy-table td {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #e2e2e2;
  vertical-align: top;
}

.samconsent-policy-table th {
  background: #f7f7f7;
  font-weight: bold;
  color: #333;
}

.samconsent-policy-table tr:nth-child(even) td {
  background: #fafafa;
}

@media (max-width: 600px) {
  #samconsent-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 16px;
  }

  .samconsent-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .samconsent-banner-actions {
    justify-content: stretch;
  }

  .samconsent-banner-actions .samconsent-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .samconsent-modal-dialog {
    margin: 16px;
    padding: 20px;
  }

  .samconsent-modal-actions {
    justify-content: stretch;
  }

  .samconsent-modal-actions .samconsent-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
