/* ==========================================================================
   Cookie Banner & Privacy Policy Modal
   ========================================================================== */

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 139, 158, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 10px 18px 10px 12px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
  z-index: 9999;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.35s;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-accept-check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1f2136;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s, background-color 0.2s;
}

.cookie-accept-check-btn:hover {
  background: #141627;
  transform: scale(1.06);
}

.cookie-accept-check-btn:active {
  transform: scale(0.95);
}

.cookie-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.cookie-more-link {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #ff7a2f;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.cookie-more-link:hover {
  opacity: 0.85;
}

/* --- Privacy Policy Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 17, 82, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #ffffff;
  border-radius: 16px;
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.open .modal-window {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e8ecf2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #031152;
  line-height: 1.3;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #718096;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close-btn:hover {
  background: #edf2f7;
  color: #1a202c;
}

.modal-body {
  padding: 24px 30px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: #334155;
  box-sizing: border-box;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.modal-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: #031152;
  margin: 22px 0 10px;
  line-height: 1.4;
}

.modal-body h2:first-child {
  margin-top: 0;
}

.modal-body ol {
  padding-left: 20px;
  margin: 0 0 16px;
}

.modal-body ol li {
  margin-bottom: 8px;
}

.modal-body p {
  margin: 0 0 12px;
}

.modal-body a {
  color: #10349e;
  text-decoration: underline;
}

/* --- Responsive Media Queries --- */
@media screen and (max-width: 768px) {
  .cookie-banner {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 8px 14px 8px 10px;
    gap: 8px;
    border-radius: 8px;
  }

  .cookie-banner.show {
    transform: translateX(-50%) translateY(0);
  }

  .cookie-accept-check-btn {
    width: 28px;
    height: 28px;
  }

  .cookie-accept-check-btn svg {
    width: 12px;
    height: 10px;
  }

  .cookie-text,
  .cookie-more-link {
    font-size: 12px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-window {
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-body {
    padding: 18px 20px;
    font-size: 12.5px;
    line-height: 1.6;
  }

  .modal-body h2 {
    font-size: 14px;
    margin: 18px 0 8px;
  }
}