/* HGEA Membership Plugin - Frontend Forms CSS */

/* Message Styles */
.hgea-message {
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #0073aa;
  background: #f7f7f7;
}

.hgea-success {
  background: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

.hgea-error {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.hgea-error {
  border-left-color: #dc3232;
  background: #fdf2f2;
}

.hgea-message.hgea-neutral {
  background: var(--hgea-color-light-green) !important;
  border-left-color: var(--hgea-color-dark-green);
  color: var(--hgea-color-dark-green);
}

/* Login Actions */
.hgea-login-actions {
  margin-top: 10px;
}

.hgea-login-actions .button {
  margin-right: 10px;
}

/* Login Form */
.hgea-login-form {
  padding: 20px;
  border: 1px solid #ddd;
  background: #fff;
}

.hgea-password-reset-request-form,
.hgea-login-form {
  max-width: 650px;
}

/* Registration Form */
.hgea-register-form {
  max-width: 500px;
  padding: 20px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 5px;
}

.hgea-register-form h3 {
  margin-top: 0;
  color: #00694c;
}

/* Form Groups and Layout */
.hgea-form-group {
  margin-bottom: 15px;
}

.hgea-form-row {
  display: flex;
  gap: 15px;
}

.hgea-form-half {
  flex: 1;
}

.hgea-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.hgea-form-group .required {
  color: #d63638;
}

/* Form Inputs */
.hgea-form-group input[type="text"],
.hgea-form-group input[type="password"],
.hgea-form-group input[type="number"],
.hgea-form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-sizing: border-box;
}

.hgea-form-group input[type="text"],
.hgea-form-group input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
}

.hgea-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.9em;
}

/* Message Styles with Border */
.hgea-message {
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid;
  border-radius: 4px;
}

/* shortcode css */
.hgea-member-profile-container {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 0 auto;
}

.hgea-member-profile-info-container {
  width: 100%;
}

.hgea-member-profile-container .profile-data-row-container {
  margin-bottom: 15px;
}

.hgea-member-profile-container .profile-data-row-container {
  margin-bottom: 15px;
}

.hgea-member-profile-container .profile-label {
  font-size: 16px;
}

.hgea-member-profile-container .profile-data {
  font-size: 16px;
  font-weight: 700;
  border: 1px solid #008369;
  padding: 15px;
  line-height: 20px;
  background: #EFEFEFDD;
}

.hgea-member-profile-container .eblast-profile-data-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hgea-member-profile-container .hgea-member-membership-card {
  background-image: url('../images/hgea_membership_card_background.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  max-width: 400px;
  height: 0;
  padding-bottom: 62.5%;
  /* Maintain 400:250 aspect ratio */
  position: relative;
}

.hgea-member-profile-container .hgea-member-membership-card-name {
  top: 56%;
  /* 140px/250px = 0.56 */
  left: 15%;
  /* 60px/400px = 0.15 */
  position: absolute;
  font-weight: 700;
  font-size: clamp(14px, 5vw, 20px);
  /* Responsive font size */
}

.hgea-member-profile-container .hgea-member-membership-card-member-id {
  top: 68%;
  /* 170px/250px = 0.68 */
  left: 15%;
  /* 60px/400px = 0.15 */
  position: absolute;
  font-weight: 700;
  font-size: clamp(14px, 5vw, 20px);
  /* Responsive font size */
}

/* Standalone membership card styles (for hgea_membership_card shortcode) */
.hgea-member-membership-card-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.hgea-member-membership-card-container .hgea-member-membership-card {
  background-image: url('../images/hgea_membership_card_background.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  max-width: 400px;
  height: 0;
  padding-bottom: 62.5%;
  /* Maintain 400:250 aspect ratio (250/400 = 0.625) */
  position: relative;
}

.hgea-member-membership-card-container .hgea-member-membership-card-name {
  top: 56%;
  /* 140px/250px = 0.56 */
  left: 15%;
  /* 60px/400px = 0.15 */
  position: absolute;
  font-weight: 700;
  font-size: clamp(14px, 5vw, 20px);
  /* Responsive font size */
}

.hgea-member-membership-card-container .hgea-member-membership-card-member-id {
  top: 68%;
  /* 170px/250px = 0.68 */
  left: 15%;
  /* 60px/400px = 0.15 */
  position: absolute;
  font-weight: 700;
  font-size: clamp(14px, 5vw, 20px);
  /* Responsive font size */
}

.unit-section-title-wrapper {
  border-style: none;
  border-width: 0px;
  background: radial-gradient(rgb(0, 131, 105) 1%, rgb(0, 104, 76) 100%);
  min-height: 0px;
}

.member-dashboard-unit-section-wrapper {
  padding: 20px 0;
  display: block;
}

.member-dashboard-unit-section-wrapper.hidden {
  display: none;
}

.switch-unit-dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  overflow: hidden;
}

.switch-unit-dropdown-content a {
  font-size: 16px;
  color: var(--hgea-color-dark-green);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.switch-unit-dropdown-content a:hover {
  background-color: #ddd;
}

.unit-contracts-unit-section {
  padding: 20px 0 40px 0;
}

.member-dashboard-section {
  padding: 20px 0;
}

.unit-excerpt-section .unit-excerpt-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.unit-excerpt-section .unit-excerpt {
  padding: 15px 0;
}

.unit-excerpt-section .switch-unit-button {
  background-color: transparent;
  border: none;
  font-size: 16px;
  color: var(--hgea-color-dark-green);
  font-style: normal;
  font-weight: 700;
  text-decoration: underline;
  text-align: right;
  white-space: nowrap;
  padding: 30px;
}

.section-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title-wrapper h3 {
  font-style: normal;
  font-weight: 400;
  color: var(--hgea-color-dark-green);
}

.section-title-wrapper a.yellow-bordered-button {
  padding-top: 15px;
  padding-bottom: 15px;
  color: var(--hgea-color-dark-green);
  text-decoration: none;
}

.leadership-section-content-container {
  display: grid;
  grid-template-columns: 47% 47%;
  column-gap: 6%;
}

.leadership-section-content-item h3 {
  font-size: 24px;
  font-style: normal;
  color: var(--hgea-color-dark-green);
  font-weight: 700;
}

table.unit-leadership-table {
  border: 1px solid black;
  border-collapse: collapse;
  font-size: 16px;
  width: 100%;
}

.unit-leadership-table th,
.unit-leadership-table td {
  border: 1px solid black;
  padding: 10px 15px;
}

.unit-documents-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.unit-documents-container .unit-document-item {
  padding: 0 30px;
}

.unit-documents-container .unit-document-item i {
  font-size: 1.5em;
}

.unit-documents-container .unit-document-item a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  line-height: 3em;
}

.unit-documents-container .unit-document-item .unit-document-title {
  padding-left: 5px;
}

/* END shortcode css */

/* Access Denied Content Styles */
.hgea-access-denied-content,
.hgea-access-error-container {
  max-width: 650px;
  margin: 40px 0;
  padding: 40px;
  text-align: left;
  align-self: center;
}

.hgea-access-denied-content h2 {
  color: #721c24;
  margin-top: 0;
  margin-bottom: 20px;
}

.hgea-login-form>p:first-of-type {
  margin-top: 0;
  margin-block-start: 0;
}

.hgea-access-denied-content p {
  margin-bottom: 15px;
}

.hgea-login-form>p>a {
  text-decoration: underline;
  color: var(--hgea-color-dark-green) !important;
}

.hgea-access-denied-actions {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hgea-access-denied-actions .button {
  padding: 12px 24px;
  font-size: 1em;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.hgea-access-denied-actions .button:not(.button-secondary) {
  background-color: #0073aa;
  color: #fff;
}

.hgea-access-denied-actions .button:not(.button-secondary):hover {
  background-color: #005a87;
}

.hgea-access-denied-actions .button-secondary {
  background-color: #f7f7f7;
  color: #555;
  border: 1px solid #ccc;
}

/* Documents Filter */
.unit-documents-page-content-container {
  margin-top: 30px;
}

.document-categories-filter.contract-categories {
  background: #F8F4EC;
  padding: 20px;
  height: 280px;
  margin-top: 30px;
}

.document-categories-filter.unit-document-categories {
  background: #F8F4EC;
  padding: 20px;
  height: 400px;
  margin-top: 30px;
}

.document-categories-filter h4 {
  color: var(--hgea-color-dark-green);
  font-family: var(--hgea-font-league-spartan);
  font-weight: var(--hgea-font-weight-bold);
  font-size: 20px;
  margin: 0 0 20px 0;
  text-align: left;
}

.document-categories-filter .section-title {
  color: var(--hgea-color-dark-green);
  font-family: var(--hgea-font-montserrat);
  font-weight: var(--hgea-font-weight-bold);
  font-size: var(--hgea-font-size-normal);
  text-align: left;
}

.document-categories-filter checkbox {
  color: var(--hgea-color-black);
  font-family: var(--hgea-font-montserrat);
  font-weight: var(--hgea-font-weight-normal);
  font-size: var(--hgea-font-size-normal);
  text-align: left;
}

.document-categories-filter input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 2px;
}

.document-categories-filter label {
  color: var(--hgea-color-black);
  font-family: var(--hgea-font-montserrat);
  font-weight: var(--hgea-font-weight-normal);
  font-size: var(--hgea-font-size-normal);
  text-align: left;
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  line-height: 20px;
}

.document-categories-filter label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  border: 2px solid var(--hgea-color-dark-green);
  border-radius: 2px;
  transition: all 0.1s ease;
}

.document-categories-filter label.checked::before {
  background-color: var(--hgea-color-dark-green);
  border-color: var(--hgea-color-dark-green);
}

.document-categories-filter label::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-radius: 2px;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.document-categories-filter label.checked::after {
  display: block;
}

.document-categories-filter input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.document-categories-filter .yellow-bordered-button {
  text-decoration: none;
}

.document-categories-filter .yellow-bordered-button {
  margin-top: 20px;
}

/* END - Documents Filter */
.unit-documents-section .divider-container {
  padding: 0 0 15px 0;
}

.hgea-access-denied-actions .button-secondary:hover {
  background-color: #e7e7e7;
}

@media (max-width: 1160px) {
  .member-dashboard-unit-section-wrapper .full-width-container {
    padding-left: 30px;
    padding-right: 30px;
  }

  .section-title-wrapper {
    padding: 0 15px;
  }

  .member-profile-card-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .member-profile-card-container>div.wp-block-group {
    gap: 10px;
  }

  /* Mobile responsive styles for member profile shortcode */
  .hgea-member-profile-container {
    display: block;
    margin: 0;
    padding: 0;
  }


  /* Mobile responsive styles for membership card shortcode */

  .hgea-member-membership-card-container .hgea-member-membership-card {
    max-width: 100%;
    margin: 0 auto;
  }

  .hgea-member-profile-container .hgea-member-membership-card {
    max-width: 100%;
    margin: 20px 0;
  }

}

/* Responsive Design for Access Denied */
@media (max-width: 768px) {

  .hgea-access-denied-content {
    margin: 20px;
    padding: 30px 20px;
  }

  .hgea-access-denied-actions {
    flex-direction: column;
    align-items: center;
  }

  .hgea-access-denied-actions .button {
    width: 100%;
    max-width: 250px;
  }

  .hgea-member-profile-container {
    display: block;
  }

  .leadership-section-content-container {
    display: block;
  }

  .unit-documents-container {
    display: block;
  }

  .section-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .section-title-wrapper h3 {
    margin: 10px 0;
  }

  .unit-documents-section .divider-container,
  .leadership-section .divider-container {
    padding: 15px 0;
  }

  .member-profile-btn-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .member-profile-btn-container div.wp-block-buttons {
    width: 100%;
    max-width: 260px;
  }

  .hgea-member-profile-info-container h2 {
    margin-bottom: 0 !important;
  }

  .unit-documents-container .unit-document-item {
    padding: 0;
    margin-top: 10px;
  }

  .unit-documents-container .unit-document-item a {
    line-height: 2em;
  }
}