:root {
  --ms-consent-navy: #081340;
  --ms-consent-teal: #008ea1;
  --ms-consent-border: #d8e1e5;
  --ms-consent-muted: #4b5967;
  --ms-consent-focus: #00a9c0;
  --ms-consent-offset: 0px;
}

html.ms-consent-banner-open body {
  padding-bottom: var(--ms-consent-offset) !important;
}

html.ms-consent-banner-open .float-contact,
html.ms-consent-banner-open #myBtn {
  visibility: hidden !important;
  pointer-events: none !important;
}

.ms-consent-banner,
.ms-consent-dialog,
.ms-consent-media-placeholder,
.ms-cookie-settings-link {
  box-sizing: border-box;
  font-family: "Noto Sans", Arial, sans-serif;
  letter-spacing: 0;
}

.ms-consent-banner *,
.ms-consent-dialog *,
.ms-consent-media-placeholder * {
  box-sizing: border-box;
}

.ms-consent-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  border-top: 3px solid var(--ms-consent-teal);
  background: #fff;
  color: var(--ms-consent-navy);
  box-shadow: 0 -8px 30px rgba(8, 19, 64, 0.18);
}

.ms-consent-banner[hidden],
.ms-consent-overlay[hidden],
.ms-consent-dialog[hidden] {
  display: none !important;
}

.ms-consent-banner-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 112px;
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.ms-consent-copy {
  min-width: 0;
}

.ms-consent-title {
  margin: 0 0 6px;
  color: var(--ms-consent-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.ms-consent-text {
  max-width: 760px;
  margin: 0;
  color: var(--ms-consent-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ms-consent-text a {
  color: #006f80;
  font-weight: 700;
  text-decoration: underline;
}

.ms-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ms-consent-button {
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 2px solid var(--ms-consent-navy);
  border-radius: 6px;
  background: #fff;
  color: var(--ms-consent-navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.ms-consent-button:hover {
  background: #edf8fa;
}

.ms-consent-button-primary {
  border-color: var(--ms-consent-navy);
  background: var(--ms-consent-navy);
  color: #fff;
}

.ms-consent-button-primary:hover {
  background: #13245a;
}

.ms-consent-button:focus-visible,
.ms-cookie-settings-link:focus-visible,
.ms-consent-close:focus-visible,
.ms-consent-switch input:focus-visible + span {
  outline: 3px solid var(--ms-consent-focus);
  outline-offset: 3px;
}

.ms-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(8, 19, 64, 0.58);
}

.ms-consent-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2147483002;
  width: min(640px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  transform: translate(-50%, -50%);
  overflow: auto;
  border: 1px solid var(--ms-consent-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ms-consent-navy);
  box-shadow: 0 24px 70px rgba(8, 19, 64, 0.32);
}

.ms-consent-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--ms-consent-border);
  background: #fff;
}

.ms-consent-dialog-title {
  margin: 0 0 5px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.ms-consent-dialog-intro {
  margin: 0;
  color: var(--ms-consent-muted);
  font-size: 14px;
  line-height: 1.5;
}

.ms-consent-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #eef3f5;
  color: var(--ms-consent-navy);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.ms-consent-options {
  padding: 8px 24px 2px;
}

.ms-consent-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ms-consent-border);
}

.ms-consent-option:last-child {
  border-bottom: 0;
}

.ms-consent-option-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.ms-consent-option-desc {
  margin: 0;
  color: var(--ms-consent-muted);
  font-size: 13px;
  line-height: 1.5;
}

.ms-consent-always {
  align-self: center;
  color: #006f4e;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ms-consent-switch {
  position: relative;
  align-self: center;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin: 0;
}

.ms-consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ms-consent-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid #89949f;
  border-radius: 14px;
  background: #d8dee3;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ms-consent-switch span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(8, 19, 64, 0.3);
  transition: transform 0.2s ease;
}

.ms-consent-switch input:checked + span {
  border-color: var(--ms-consent-teal);
  background: var(--ms-consent-teal);
}

.ms-consent-switch input:checked + span::before {
  transform: translateX(22px);
}

.ms-consent-dialog-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--ms-consent-border);
  background: #fff;
}

.ms-cookie-settings-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.ms-cookie-settings-standalone {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2147482999;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--ms-consent-navy);
  border-radius: 6px;
  background: #fff;
  color: var(--ms-consent-navy);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(8, 19, 64, 0.15);
}

.ms-consent-media-placeholder {
  width: 100%;
  min-height: 260px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--ms-consent-border);
  background: #f2f7f8;
  color: var(--ms-consent-navy);
  text-align: center;
}

.ms-consent-media-placeholder[data-service="youtube"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.ms-consent-media-placeholder[data-service="maps"] {
  min-height: 400px;
}

.ms-consent-media-placeholder p {
  max-width: 520px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.form-privacy-notice {
  margin: 4px 0 14px;
  color: #44515e;
  font-size: 13px;
  line-height: 1.5;
}

.form-privacy-notice a {
  color: #006f80;
  font-weight: 700;
  text-decoration: underline;
}

[dir="rtl"] .ms-consent-dialog,
[dir="rtl"] .ms-consent-banner {
  text-align: right;
}

[dir="rtl"] .ms-consent-switch span::before {
  right: 3px;
  left: auto;
}

[dir="rtl"] .ms-consent-switch input:checked + span::before {
  transform: translateX(-22px);
}

@media (max-width: 900px) {
  .ms-consent-banner-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ms-consent-actions {
    justify-content: stretch;
  }

  .ms-consent-button {
    flex: 1 1 0;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .ms-consent-banner-inner {
    width: calc(100% - 28px);
    min-height: 0;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
  }

  .ms-consent-title {
    font-size: 16px;
  }

  .ms-consent-text {
    font-size: 13px;
    line-height: 1.45;
  }

  .ms-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ms-consent-actions .ms-consent-button:last-child {
    grid-column: 1 / -1;
  }

  .ms-consent-button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .ms-consent-dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 18px);
    transform: none;
    border-width: 1px 0 0;
    border-radius: 8px 8px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ms-consent-dialog-header,
  .ms-consent-options,
  .ms-consent-dialog-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .ms-consent-dialog-title {
    font-size: 19px;
  }

  .ms-consent-option {
    gap: 12px;
  }

  .ms-consent-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ms-consent-media-placeholder[data-service="maps"] {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-consent-switch span,
  .ms-consent-switch span::before {
    transition: none;
  }
}
