/* =====================================================
   modals.css  -  Modals: dialogs, user menu, toast, theme switch, plans, account
   Split from gpnotesv4.css (original lines 1339-2133)
   ===================================================== */

#about_us_div {
  position: fixed;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  z-index: 5;
  font-size: 14px;
  background-color: var(--color2);
  color: var(--color1);
  max-width: 400px;
  width: 80%;
  padding: 20px;
  display: none;
  border-radius: 5px;
  border: 1px solid white;
  margin: 70px auto 70px;
  flex-direction: column;
  text-align: justify;
  overflow-y: auto;
}



.card_view {
  position: fixed;
  /* Or use absolute if inside a container */
  top: 50%;
  /* Adjust the top position as needed */
  left: 50%;
  /* Center horizontally */
  transform: translate(-50%, -50%);
  /* Center the card */
  z-index: 5;
  /* Ensure it appears above other content */
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  width: 90%;
  /* max-width: 400px; */
  background-color: var(--subdivColor1);
  color: var(--color1);
  display: none;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
  /* Prevent overflow of the entire card */
  scrollbar-width: none;
  /* Hide scrollbar in Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar in IE/Edge */
  max-height: 90%;
  /* Prevent the card from exceeding the viewport height */
}

.card_view_header {
  position: sticky;
  top: 0;
  /* Keep the header at the top */
  z-index: 1;
  /* Ensure the header stays on top of the content */
  background-color: var(--subdivColor1);
  /* Match header background to card */
  padding: 5px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  /* Optional: Add a border under the header */
}

.closeBtnCommon {
  right: 10px;
  color: var(--color1);
  cursor: pointer;
  font-size: 30px;
}

.card_view_content {
  overflow-y: auto;
  /* Enable vertical scrolling for the content */
  padding: 10px;
  max-height: calc(100% - 50px);
  /* Adjust height to account for header */
  flex-grow: 1;
  /* Ensure content fills available space */
}




.card_view::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar in Webkit browsers */
}

#ref_link_bg_image {
  font-style: italic;
  color: var(--color3);
  text-align: center;
  font-size: 14px;
}

#subscribeBtn {
  color: var(--color1);
  display: none;
  text-align: center;
  width: auto;
  padding: 5px 10px;
  border-radius: 10px;
  margin: auto;
  font-weight: bold;
  background: var(--submitColor);
}


#advertTitle {
  display: block;
  color: var(--color3);
  letter-spacing: 12px;
  font-size: 12px;
  text-align: center;
}



/* CSS to prevent scrolling when the div is shown */
.no-scroll {
  overflow: hidden;
}

#infoFlowchart {
  font-style: italic;
  font-size: 10px;
  color: var(--color3);
}

#general_modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 2;
  width: 100vw;
  /* Semi-transparent black */
  background-color: rgba(0, 0, 0, 0.7);
}

#imgDiv {
  max-height: 80vh;
  width: 95%;
  overflow: auto;
  justify-content: center;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  position: fixed;
}

#confirm_tab_div {
  display: none;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 5px var(--color3);
  flex-direction: column;
  justify-content: center;
  background-color: var(--color2);
  margin: auto;
  width: 75%;
  max-width: 340px;
  padding: 18px 10px 12px;
  z-index: 5;
  position: fixed;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  border-radius: 7px;
  border: 1px solid var(--color3);
}

#confirm_tab_msg {
  color: var(--color1);
  text-align: left;
  margin: 5px 10px 15px;
  font-size: 15px;
  line-height: 1.4;
}

#confirm_tab_topic {
  color: var(--seventh-layer);
  font-weight: 700;
}

#confirm_tab_actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 10px;
}

#confirm_tab_actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 96px;
  height: 35px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

#confirm_tab_cancel {
  background-color: transparent;
  color: var(--color1);
  border: 1px solid var(--color3);
}

#confirm_tab_proceed {
  background-color: var(--submitColor);
  color: var(--color1);
  border: none;
}

#flowChartId {
  position: fixed;
  background: white;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  overflow: scroll;
  max-width: 95%;
  width: 95%;
  height: 500px;
  max-height: 90vh;
  padding: 10px;
  display: none;
}

#modalImage {
  display: none;
  margin: 10px auto 0px auto;

}

#youtube_div {
  display: none;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 5px var(--color3);
  justify-content: center;
  background-color: var(--color2);
  margin: auto;
  z-index: 5;
  width: 75%;
  max-width: 400px;
  padding: 10px 2px;
  position: fixed;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  border: 1px solid var(--color3);
}

#feedback_div {
  display: none;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 5px var(--color3);
  flex-direction: column;
  justify-content: center;
  background-color: var(--color2);
  margin: auto;
  width: 75%;
  max-width: 400px;
  padding: 10px 2px;
  z-index: 5;
  position: fixed;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  border-radius: 7px;
  border: 1px solid var(--color3);
}

#feedback_form {
  margin: auto;
  width: 90%;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

#feedback_title {
  color: var(--color1);
  text-align: center;
  margin: 5px 0px 10px;
}

form>label {
  color: var(--color1);

}

.highlighted {
  background-color: orange;
  color: black;
}

.current_highlighted {
  background-color: yellow;
  color: black;
}



/* ===== USER AVATAR IN HEADER ===== */

#userAvatarContainer {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 10px 8px;
  cursor: pointer;
  flex-shrink: 0;
}

#userAvatarImg {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  object-fit: cover;
}


/* ===== USER INFO IN MENU ===== */

#userMenuInfo {
  display: none;
  padding: 8px 12px 4px;
}

#menuUserName {
  display: block;
  font-size: 0.78rem;
  color: #aaaaaa;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  padding-left: 4px;
}

.signOutBtn {
  color: #ff6b6b !important;
}

.menuDivider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}




#topic_feedback {
  margin-top: 7px;
  width: 95%;
  border: 1px solid var(--color3);
  padding: 7px;
  color: var(--color1);
  background-color: var(--color4);
}

#feedback {
  margin-top: 7px;
  padding: 7px;
  width: 95%;
  height: 100px;
  color: var(--color1);
  max-height: 200px;
  background-color: var(--color4);
}

#topic_feedback:focus,
#feedback:focus {
  outline: 2px solid var(--color3);
}

#close_feedback {
  display: flex;
  position: absolute;
  top: 7px;
  right: 10px;
  color: var(--color1);
  font-size: 30px;
  justify-content: flex-end;
  cursor: pointer;

}

#close_about_us {
  display: flex;
  position: absolute;
  top: 7px;
  right: 10px;
  color: var(--color1);
  font-size: 30px;
  justify-content: flex-end;
  cursor: pointer;

}

#feedback_thanks {
  color: var(--color1);
  justify-content: center;
  margin: 0 auto;
}

#submitFeedback {
  height: 35px;
  background-color: var(--submitColor);
  border: none;
  justify-content: center;
  display: flex;
  align-items: center;
  color: var(--color1);
  border-radius: 5px;
}

#toast {
  visibility: hidden;
  min-width: 100px;
  background-color: var(--color3);
  color: white;
  text-align: center;
  border-radius: 2px;
  position: fixed;
  z-index: 1;
  transform: translate(-50%);
  left: 50%;
  padding: 10px;
  top: 110px;
  font-size: 15px;
  border-radius: 5px;
}

#toast.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 1.5s;
  animation: fadein 0.5s, fadeout 0.5s 1.5s;
}

@-webkit-keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }

  to {
    top: 110px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }

  to {
    top: 110px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    top: 110px;
    opacity: 1;
  }

  to {
    top: 220px;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    top: 110px;
    opacity: 1;
  }

  to {
    top: 220px;
    opacity: 0;
  }
}


/* for light dark theme switch */

.container {
  display: flex;
  justify-content: center;
  align-items: center;


}

.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 25px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #004a87;
  ;
  transition: 0.4s;
  border-radius: 34px;

}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 5px;
  bottom: 5px;
  background-image: url("../images/moon.webp");
  background-size: cover;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #eeeeee;
  /* Blue color for dark mode */
  border: 1px solid var(--color3);
}

input:checked+.slider:before {
  transform: translateX(20px);
  background-image: url("../images/sun.webp");


}




.bold {
  font-weight: bold;
  text-decoration: underline;
}

.myIcon {

  display: inline-block;
  width: 25px;
  margin-right: 10px;
  /* Size of the circle */
  height: 25px;
  /* Size of the circle */
  border-radius: 50%;
  /* Makes the shape a circle */
  background-color: #ffffff;
  /* Background color */
  text-align: center;
  line-height: 25px;
  /* Vertically center the emoji */
  font-size: 18px;
  /* Size of the emoji */
  border: 2px solid var(--color3)
    /* Optional: border around the circle */

}

/* --- PLANS / PRICING MODAL --- */
#plans_div {
  /* Cards sit on the theme surface (--color4), so the accent is tuned to stay
     readable on it: bright green on the dark card, deep green on the light one */
  --plan-accent: #3ddc84;
  --plan-accent-contrast: #0d2f1c;
  --plan-tint: rgba(61, 220, 132, 0.14);
  position: fixed;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  z-index: 5;
  background-color: var(--color2);
  color: var(--color1);
  width: min(760px, 80vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 30px 26px 24px;
  display: none;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: plans_pop 0.18s ease-out;
}

body.light #plans_div {
  --plan-accent: #0b8f43;
  --plan-accent-contrast: #ffffff;
  --plan-tint: rgba(11, 143, 67, 0.1);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

@keyframes plans_pop {
  from {
    opacity: 0;
    transform: translate(-50%, -47%) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.plans_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

#plans_div h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color1);
}

.plans_subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--color3);
  text-align: center;
}

.plans_cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  padding-top: 6px;
}

.plan_card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 18px 12px 16px;
  background-color: var(--color4);
  color: var(--color1);
  border: 2px solid var(--color5);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.plan_card:hover {
  border-color: var(--plan-accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

#plans_div .plan_card:focus-visible {
  outline: 3px dashed var(--plan-accent);
  outline-offset: 4px;
}





.plan_duration {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color1);
  opacity: 0.8;
}

.plan_price {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--plan-accent);
}

.plan_per {
  font-size: 12px;
  color: var(--color1);
  opacity: 0.65;
}

.plan_save {
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background-image: linear-gradient(var(--plan-tint), var(--plan-tint));
  color: var(--plan-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plans_note {
  margin: 0;
  font-size: 12px;
  color: var(--color3);
  text-align: center;
}

#plans_login_prompt {
  text-align: center;
  width: 100%;
  border-top: 1px solid var(--color5);
  padding-top: 12px;
  font-size: 13px;
  color: var(--color3);
}

#plans_login_prompt p {
  margin: 0 0 8px;
}

.plans_signin_btn {
  padding: 8px 20px;
  background-color: var(--submitColor);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

#close_plans {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--color3);
  transition: background-color 0.15s, color 0.15s;
}

#close_plans:hover {
  background-color: var(--color5);
  color: var(--color1);
}

.plan_tick {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--plan-accent);
  color: var(--plan-accent-contrast);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}

.plan_card.selected {
  border-color: var(--plan-accent);
  background-image: linear-gradient(var(--plan-tint), var(--plan-tint));
  outline: 3px solid var(--plan-accent);
  outline-offset: 2px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.plan_card.selected .plan_tick {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 620px) {
  #plans_div {
    padding: 26px 18px 20px;
    gap: 14px;
  }

  .plans_cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

#plans_action_btn {
  width: 100%;
  padding: 13px 16px;
  background-color: var(--submitColor);
  color: #ffffff;
  border: none;
  text-align: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: filter 0.18s, transform 0.12s, opacity 0.2s;
}

#plans_action_btn:not(:disabled):hover {
  filter: brightness(1.12);
}

#plans_action_btn:not(:disabled):active {
  transform: scale(0.985);
}

#plans_action_btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- ACCOUNT MODAL --- */
#account_div {
  display: none;
  position: fixed;
  flex-direction: column;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color4);
  border-radius: 12px;
  padding: 28px 24px 24px;
  width: min(340px, 90vw);
  z-index: 1000;
  gap: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

#close_account {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--color3);
  line-height: 1;
}

#account_avatar_wrap {
  margin-bottom: 8px;
}

#account_avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--first-layer);
}

#account_name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color1);
  text-align: center;
}

#account_email {
  font-size: 13px;
  color: var(--color1);
  opacity: 0.7;
  text-align: center;
  margin-bottom: 10px;
}

#account_sub_section {
  width: 100%;
  background-color: var(--color2);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 6px 0 14px;
  text-align: center;
}

#account_sub_status {
  font-size: 14px;
  font-weight: 600;
  color: var(--color1);
}

#account_sub_status.sub_active {
  color: #16c457;
}

#account_sub_status.sub_inactive {
  color: var(--color1);
  opacity: 0.6;
}

#account_sub_expiry {
  font-size: 12px;
  color: var(--color1);
  opacity: 0.9;
  margin-top: 4px;
}

#account_signout_btn {
  width: 100%;
  padding: 10px;
  background: rgb(183, 0, 0);
  /* border: 1.5px solid var(--first-layer); */
  color: white;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

#account_signout_btn:hover {
  background-color: var(--first-layer);
  color: #fff;
}

/* ── Admin CMS Panel ── */
