/* The Modal (background) */


.modal {
    --modaltheme1 : #000000;
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /*Enable scroll if needed*/
    
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    
    
  }

  .modal p{
    font-size: 1.5rem;
  }



  .modalOpened{
    display: block !important;
}
  
  /* Modal Content */
  .modal-content {
    overflow: scroll;
    overflow-x: hidden;
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    /* border: 1px solid #888; */
    width: 80%;
    height: 80%;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s
  }
  
  /* Add Animation */
  @-webkit-keyframes animatetop {
    from {top:-300px; opacity:0} 
    to {top:0; opacity:1}
  }
  
  @keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
  }
  
  /* The Close Button */
  .close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
  }
  
.modal-header {
  

    position: fixed;
    padding: 2px 16px;
    background-color: var(--primary-color-shade-lighter);
    color: white;


    box-shadow: -5px -2px 16px 0px rgb(38, 38, 39);
    
    background-color: var(--modaltheme1);
    top: 0;
    position: -webkit-sticky; /* Safari fallback */
    position: sticky;
    z-index: 99;
}



.modal-body {padding: 2px 16px;}

.modal-footer {
    position: fixed;
    padding: 2px 16px;
   
    color: white;
    /* box-shadow: -5px -2px 16px 0px rgb(38, 38, 39); */
    background-color: var(--modaltheme1);
    bottom: 0;
    position: -webkit-sticky; /* Safari fallback */
    position: sticky;
    z-index: 99;
}

/* -------------------------------------------------------------------------- */
/* Birthdate Modal - Temporary enrollment bridge */
/* -------------------------------------------------------------------------- */

.birthdate-modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.birthdate-modal-overlay.active {
    display: flex;
}

/* Lock body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

.birthdate-modal-box {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 400px;
    animation: animatetop 0.3s;
    position: relative;
}

/* Flatpickr inside modal - use static positioning */
.birthdate-modal-box .flatpickr-wrapper {
    display: block;
    width: 100%;
}

.birthdate-modal-box .flatpickr-calendar {
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid #ccc;
}

.birthdate-modal-box h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.birthdate-modal-box p {
    margin: 0 0 1.5rem 0;
    color: #555;
    font-size: 1rem;
}

.birthdate-modal-box input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

.birthdate-modal-box input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.birthdate-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.birthdate-modal-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.birthdate-modal-btn.cancel {
    background-color: #ccc;
    color: #333;
}

.birthdate-modal-btn.cancel:hover {
    background-color: #bbb;
}

.birthdate-modal-btn.confirm {
    background-color: var(--primary-color);
    color: #fff;
}

.birthdate-modal-btn.confirm:hover {
    background-color: var(--primary-color-shade-lighter);
}

