body {
  overscroll-behavior: contain;
}

.member-portal {
  text-align: center;
  margin: 20px auto;
  display: grid;
  place-items: center;


  .member-badge {
    font-size: 17px;
    font-weight: 300;
    float: inline-start;
    margin-right: 3px;
    margin-top: 3px;
    /* min-width: 90px; */
    padding: 3px 20px;
    text-align: center;
  }

  .link {
    display: block;
    padding: 4px;
    margin: 7px 5px 15px;
    text-decoration: none;
    color: #181f2a;
    background: transparent;
    border: none;
    width: stretch;

    &:hover {
      color: #4563a8;
    }
  }
}

.card {
  max-width: 700px;
  background: white;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 20px;
  padding: 20px;
}

/* Header */
.header {
  background: #F58130;
  color: white;
  padding: 30px;

  border-radius: 12px 12px 0 0;

  background: linear-gradient(
    76deg,
    #F58130,
    #ff9a3c,
    #ff6b00,
    #ffb347,
    #F58130,
    #ff9a3c
  );
  background-size: 4000px 100%;
  animation: gradientMove 5s ease infinite;

  .logo {
    width: 500px;
    max-width: 100%;
    height: auto;
  }
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.member-menu-container {
  position:absolute; 
  top:10px; 
  right:10px;
}

.member-menu {
  display:none; 
  position:absolute; 
  right:0; 
  top:120%; 
  background:#fff; 
  border:1px solid #ddd; 
  box-shadow:0 2px 6px rgba(0,0,0,0.15); 
  z-index:500; 
  min-width:140px;
}

#error {
  color: red;
  font-weight: 600;
  margin: 20px 0 -20px;
}

/* Main Section */

.main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "content photo";
  gap: 20px;

  h2 {
    margin: 0;
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.1;
  }

  h3 {
    font-size: clamp(28px, 6vw, 42px);
  }

  h4 {
    font-size: clamp(18px, 6vw, 28px);
  }

  p {
    font-size: clamp(14px, 6vw, 18px);
    margin: 0;
    color: #4b5563;
  }
}

@media (max-width: 500px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "content";
  }
}

.left {
  background: #f5f5f5;
  padding: 20px;
  text-align: left;
  grid-area: content;
}

.right {
  grid-area: photo;
}

.member-photo {
  width: 225px;
  max-width: 100%;
  max-height: 250px;
  height: auto;
  /* border-radius: 8px; */
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Details Section */
.details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "content photo";
  gap: 20px;
  align-items: center;

  p {
    margin: 0;
    font-size: clamp(14px, 6vw, 18px);
    line-height: 2.2;
    color: #4b5563;
  }
}

@media (max-width: 500px) {
  .details {
    grid-template-columns: 1fr;
    grid-template-areas: "content" "photo";
  }
}

/* Footer */
.footer {
  background: #F58130;
  color: white;
  padding: 20px;
  text-align: center;

  border-radius: 0 0 12px 12px;
}



/* Modal container */

#member-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100000;

  /* 🔑 prevent page scroll */
  overflow-y: auto;
}

.member-modal-content {
  background: #ffffff;
  max-width: 660px;
  max-height: 80vh;
  margin: 10vh auto;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow-y: auto;

  animation: adcFadeUp 0.2s ease-out;

  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.5;

  /* size & scrolling behaviour */
  width: 100%;                  /* allow responsive width from parent */
  max-width: 580px;
  border-radius: 8px;
  position: relative;
  padding: 1.5rem;
}



/* Heading */
.member-modal-content h2 {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.3;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 10px;
}

/* Form layout */
.member-modal-content label {
  display: block;
  margin-top: 14px;
  margin-bottom: 4px;
  font-weight: 600;
}

.member-modal-content input,
.member-modal-content select {
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
}

/* Button row */
.member-modal-content .submit {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.member-modal-content .button {
  padding: 16px;
}

/* View-only mode */
#member-modal[data-mode="view"] input,
#member-modal[data-mode="view"] select {
  background: #f6f7f7;
  cursor: not-allowed;
}

.member-badge {
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.member-active {
  background: #46b450;
}

.member-inactive {
  background: #dc3232;
}

.member-male {
  background: #3b82f6;
}

.member-female {
  background: #ec4899;
}

.member-other {
  background: #6b7280;
}

.member-type-1 {
  background: #2563eb;
}

.member-type-2 {
  background: silver;
}

.member-type-3 {
  background: gold;
}

.member-type-0,
.member-type-4,
.member-type-5 {
  background: red;
}

#member-notice {
  display: none;
  margin-bottom: 15px;
  padding: 10px 12px;
  border-left: 4px solid #46b450;
  background: #f0f6fc;
  color: #1d2327;
}

#member-notice.error {
  border-color: #dc3232;
  background: #fcf0f1;
}

/* Mobile */
@media (max-width: 600px) {
.member-modal-content {
    margin: 5vh 12px;
    padding: 20px;
}
}

/* Animation */
@keyframes adcFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.members-subscriptions-fields h3 {
  display: block;
  width: 100%;
}

.members-subscriptions-fields input,
.members-subscriptions-fields select{
  background-color: var(--et_inputs-bg-color, var(--et_white-2-light-dark));
  width: 100%;
  color: var(--et_dark-2-white);
  font-size: 1.14rem;
  box-shadow: none;
  text-align: start;
  border: 1px solid var(--et_inputs-border-color, var(--et_border-color));
  outline: 0px;
  border-radius: var(--et_inputs-border-radius, 0);
  height: 37px;
}

.form-row-first,
.form-row-last,
.form-row-wide {
  display: block;
}

.form-row-first {
  clear: both;
  width: 48%;
  float: left;
  margin-right: 4%;
}
.form-row-last {
  width: 48%;
  float: left;
}

.form-row-wide {
  width: 100%;
  clear: both;
  /* margin-bottom: 15px; */
}

@media screen and (max-width: 600px) {
  .form-row-first,
  .form-row-last,
  .form-row-wide {
    width: 100%;
  }
}

.ausdc-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.ausdc-scroll-wrapper .widefat {
  min-width: 1200px; /* Ensures scroll appears */
}


/* Base Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  background: #e5e7eb; /* light gray */
  color: #1f2937;
  user-select: none;
  text-decoration: none;
}

/* Hover / Active */
.button:hover {
  background: #d1d5db;
}

.button:active {
  transform: scale(0.96);
}

/* Primary (Accent) */
.button.primary {
  background: #2563eb;
  color: #fff;
}
.button.primary:hover {
  background: #1d4ed8;
}

/* Info */
.button.info {
  background: #0ea5e9;
  color: white;
}
.button.info:hover {
  background: #0284c7;
}

/* Success */
.button.success {
  background: #22c55e;
  color: white;
}
.button.success:hover {
  background: #16a34a;
}

/* Warning */
.button.warning {
  background: #f59e0b;
  color: white;
}
.button.warning:hover {
  background: #d97706;
}

/* Danger */
.button.danger {
  background: #ef4444;
  color: white;
}
.button.danger:hover {
  background: #dc2626;
}

/* Ghost / Minimal */
.button.ghost {
  background: transparent;
  color: #374151;
  border: 2px solid #d1d5db;
}
.button.ghost:hover {
  background: #f3f4f6;
}

.member-details {
  max-width: 450px;
  margin: 20px auto;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0 15px;
}

.member-more-details {
  text-align: left;
  font-size: 14px;
}

/* === Overlay Background === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  text-align: center;
  transition: display 0.25s ease;
  z-index: 999;
  max-width: 100%;
  overscroll-behavior: contain;
}


.member-modal {
  /* full‑screen overlay with semi‑transparent background */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  /* center the inner box horizontally & vertically */
  display: flex;
  align-items: center;
  justify-content: center;
  /* allow page‑level scrolling when modal content exceeds viewport */
  padding: 1rem;          /* keep some breathing room on small screens */
  overflow: auto;
}

/* keep form inputs styled the same */
.member-modal input[type="text"],
.member-modal input[type="email"],
.member-modal input[type="password"] {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  box-sizing: border-box;
  border-radius: 4px; 
  border: 1px solid #ccc;
  font-size: 16px;
}

/* === Modal Box === */
.modal-wrap {
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  width: 90%;
  max-width: 480px;
  padding: 1.8rem;
  border-radius: 16px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.15);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  position: relative;
  margin: auto;
  text-align: left;
}


/* Optional Close X Button */
.member-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;

  &:hover {
    background: #e5e7eb;
  }
}

.modal-close:hover {
  background: #e5e7eb;
}

.member-portal-login {
  text-align: center;
}