html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* Modal Content */
.modal-content {
  position: relative;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 850px;
  height: 90vh;
  z-index: 10;
  overflow: hidden;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: #f9fafb;
}

/* Scrollable Content Area */
.modal-scroll-area {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 50px;
}

.privacy-policy-content {
  width: 800px;
  max-width: 100%;
}

/* Privacy Policy Document Styles */
.privacy-policy-document {
  background-color: #ffffff;
  color: #2f2f2f;
  font-family: "yugothib-500";
  font-size: 10px;
  line-height: 15px;
  letter-spacing: -0.3px;
  margin-top: 30px;
}

/* Main Title */
.main-title {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #d80c18;
  font-family: "yugothib-600";
}

.main-title h1 {
  font-size: 16px;
  font-weight: bold;
  color: #d80c18;
  font-family: "yugothib-600";
  line-height: 1.4;
}

/* Secondary Title */
.secondary-title {
  margin: 40px 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #d80c18;
}

.secondary-title h2 {
  font-size: 14px;
  font-weight: bold;
  color: #2f2f2f;
  font-family: "yugothib-500";
  line-height: 1.4;
}

/* Policy Introduction */
.policy-intro {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border-left: 4px solid #0352d0;
  border-radius: 4px;
}

.policy-intro p {
  font-size: 10px;
  line-height: 15px;
  font-family: "yugothib-500";
  font-weight: 500;
}

/* Policy Section */
.policy-section {
  margin-bottom: 32px;
}

/* Policy Item */
.policy-item {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
}

.policy-number {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-weight: bold;
  font-family: "yugothib-500";
  font-size: 14px;
  line-height: 15px;
  margin-right: 12px;
  font-family: "yugothib-600";
}

.policy-text {
  flex: 1;
  font-family: "yugothib-500";
  font-weight: 500;
  font-size: 14px;
  line-height: 150%;
  font-family: "yugothib-500";
}

/* Policy Divider */
.policy-divider {
  height: 1px;
  background-color: #bebebe;
  margin: 40px 0;
}

/* Detailed Section */
.detailed-section {
  margin-bottom: 40px;
}

.detailed-section h3 {
  font-size: 14px;
  font-weight: bold;
  color: #2f2f2f;
  margin-bottom: 20px;
  font-family: "yugothib-600";
}

/* Subsection */
.subsection {
  margin-bottom: 24px;
  margin-left: 10px;
  display: flex;
  align-items: flex-start;
}
.card-description {
  border: 1px solid #0000001a;
  padding: 20px;
  margin-left: 25px;
  font-size:12px;
  line-height:150%;
}
.subsection-number {
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  font-weight: bold;
  font-family: "yugothib-600";
  font-size: 14px;
  line-height: 150%;
}

.subsection-content {
  flex: 1;
}

.subsection-content p {
  font-family: "yugothib-500";
  font-weight: 500;
  font-size: 14px;
  line-height: 150%;
  margin-bottom: 12px;
}

/* Item List */
.item-list {
  transform: translateX(-20px);
}

.list-item {
  display: flex;
  margin-bottom: 8px;
  align-items: flex-start;
}

.item-number {
  flex-shrink: 0;
  width: 20px;
  text-align: left;
  font-weight: bold;
  font-family: "yugothib-600";
  font-size: 14px;
  line-height: 150%;
  margin-right: 8px;
}
.item-number-sub {
  width: 35px;
  font-family: "yugothib-500";
}
.text-bold,
.subsection-content .text-bold {
  font-family: "yugothib-600" !important;
}

.item-text {
  flex: 1;
  font-family: "yugothib-500";
  font-weight: 500;
  font-size: 14px;
  line-height: 150%;
}

.item-sub-text {
  margin-left: 22px;
}

.pre-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.red-link {
  color: #d32d1f;
  cursor: pointer;
  text-decoration: none;
}
.normal-link {
  color: #2f2f2f;
  cursor: pointer;
}

.stop-button {
  padding: 13px 35px;
  color: #d32d1f;
  background-color: white;
  border: 1px solid #d32d1f;
  margin: 10px 35px 30px 35px;
  cursor: pointer;
  text-wrap: nowrap;
}

.stop-button:hover {
  background-color: #d32d1f;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 8px;
  }

  .modal-content {
    max-width: 100%;
    height: 90vh;
    margin-top: 30px;
  }

  .modal-scroll-area {
    padding: 16px 20px;
  }

  .privacy-policy-content {
    width: 100%;
  }

  /* Force all modal fonts to 12px for consistency on smartphone */
  .privacy-policy-document,
  .privacy-policy-document * {
    font-size: 12px !important;
    line-height: 1.6 !important;
  }

  .policy-item,
  .subsection {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .policy-number,
  .subsection-number {
    width: auto;
    margin-bottom: 4px;
  }

  .joint-usage-section {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .modal-scroll-area {
    padding: 16px;
  }
}

/* Scrollbar Styling */
.modal-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.modal-scroll-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-scroll-area::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Focus styles for accessibility */
.modal-close:focus {
  outline: 2px solid #0352d0;
  outline-offset: 2px;
}

.trigger-button:focus {
  outline: 2px solid #0352d0;
  outline-offset: 2px;
}

/* Animation for modal appearance */
.modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Print styles */
@media print {
  .modal-overlay {
    position: static;
    background: none;
    height: auto;
    padding: 0;
  }

  .modal-background {
    display: none;
  }

  .modal-content {
    box-shadow: none;
    border-radius: 0;
    height: auto;
    max-width: none;
  }

  .modal-close {
    display: none;
  }

  .modal-scroll-area {
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .privacy-policy-content {
    width: 100%;
  }
}


/* ---- Keep numbers + text inline on SP & iPad ---- */
@media (max-width: 1023px) {
  /* Main numbered rows */
  .policy-item,
  .subsection,
  .list-item {
    display: flex !important;
    flex-direction: row !important;        /* override column on small screens */
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* The number “badge” blocks */
  .policy-number,
  .subsection-number,
  .item-number,
  .item-number-sub {
    flex: 0 0 auto !important;             /* don’t stretch or wrap */
    width: auto !important;                 /* cancel fixed widths on small screens */
   
    margin-bottom: 0 !important;            /* cancel mobile rule that adds a drop-space */
    line-height: 1.4 !important;            /* keeps the numeral vertically comfy */
    white-space: nowrap !important;         /* keep e.g., “1.” together */
  }

  /* The text blocks should fill remaining line space */
  .policy-text,
  .subsection-content,
  .item-text {
    flex: 1 1 auto !important;
  }
}
