/* Mautic Form Styles */

.mb-3 {
  margin-bottom: 0.5rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.3;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
}

.mauticform-input.form-control {
  width: 100%;
  box-sizing: border-box;
}

.form-control::placeholder {
  color: #6c757d;
}

.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.3;
  border-radius: 0.25rem;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: #15919E;
  border-color: #15919E;
}

.btn-primary:hover {
  background-color: #127a85;
  border-color: #127a85;
}

.mauticform-label {
  display: none !important;
}

.mauticform-row {
  margin-bottom: 0.5rem;
}

.mauticform-errormsg {
  display: block;
  color: red;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.close-form {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #000;
  line-height: 1;
  z-index: 201;
}

.close-form:hover {
  color: #ff0000;
}

/* Modal/Popup styles to match original webform behavior */

/* Hide the old webform block */
section#block-webform {
    display: none !important;
}

/* Container needs relative positioning for X button */
#block-mautic-webform {
    position: relative;
}

.close-form {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #000;
  line-height: 1;
  z-index: 201;
}

.close-form:hover {
  color: #ff0000;
}

/* Dark background overlay */
.show-join-us #darken_screen {
    position: fixed;
    background: rgba(0,0,0,0.7);
    z-index: 150;
    height: 100vh;
    width: 100vw;
    top: 0;
    left: 0;
    cursor: pointer;
}

#darken_screen {
    display: none;
}

.show-join-us #darken_screen {
    display: block;
}

#block-youth-y4dmauticjoinusform {
    max-width: 500px;
    top: 50%;
    left: 50%;
    position: fixed;
    z-index: 200;
    background: white;
    border: solid 1px #ccc;
    padding: 10px;
    padding-top: 10px;
    border-radius: 10px;
    transition: 2s;
    transform: translate(-50%, -50%) translateY(-1000px);
}

.show-join-us #block-youth-y4dmauticjoinusform {
    transform: translate(-50%, -50%) translateY(0px);
}

#block-youth-y4dmauticjoinusform h2 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
    padding-top: 0.25rem;
}

/* Reduce spacing for intro text */
#edit-processed-text-01 {
    margin-bottom: 0.25rem !important;
}

#edit-processed-text-01 p {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

/* Form item spacing */
#block-youth-y4dmauticjoinusform .mauticform-row {
    padding-top: 5px;
    margin-bottom: 0.5rem;
}

#block-youth-y4dmauticjoinusform .mauticform-button-wrapper {
    text-align: center;
    padding-top: 5px;
    margin-top: 0.5rem;
}

/* Mobile styles */
@media only screen and (max-width: 1023px) {
    #block-youth-y4dmauticjoinusform {
        max-width: 85vw;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    /* Ensure Join Us button is visible on mobile */
    #join_us_button {
        display: block !important;
    }
    
    #join_us_button img {
        display: block !important;
    }
}
