/* =========================
   GENERAL CONTAINER LAYOUT
========================= */
.md-dashboard {
  width:100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.md-dashboard h2 {
  color: #0073aa;
  margin-top: 20px;
}
.md-dashboard h3{padding-top:20px;padding-bottom: 10px;}
/* ====================
   NAVIGATION MENU
==================== */
.md-container nav ul,
.md-dashboard nav ul{
  list-style: none;
  padding: 10px;
  display: flex;
  gap: 15px;
  background: #f2f2f2;
  margin-bottom: 20px;
}
.md-container nav ul li a,
.md-dashboard nav ul li a{
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* ====================
   DIRECTORY GRID
==================== */
.md-directory-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.md-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.member-card {
  border: 1px solid #ccc;
  padding: 15px;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.member-card:hover {
  transform: translateY(-3px);
}
.member-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.member-card p {
  margin: 5px 0;
}
.member-card .btn {
  display: inline-block;
  padding: 8px 12px;
  margin-top: 10px;
  background-color: #0073aa;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}
.member-card .btn:hover {
  background-color: #005d8f;
}
.no-member {
  grid-column: 1 / -1;
  width: 100%;
  display: block;
  text-align: center;
  color: red;
  font-style: italic;
  padding: 20px 0;
}


/* ====================
   full profile
==================== */

.md-profile-box {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.md-profile-image {
  flex: 0 0 250px;
}

.md-profile-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.md-profile-details {
  flex: 1 1 400px;
}

.md-profile-details h2 {
  margin-top: 0;
  font-size: 24px;
  margin-bottom: 10px;
}

.md-profile-details p {
  margin: 6px 0;
}
.back-to-directory {
  display: inline-block;
  margin-top: 20px;
  background-color: #0073aa;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.back-to-directory:hover {
  background-color: #005d8f;
}


/* ====================
   PAGINATION
==================== */
.md-pagination {
  margin-top: 20px;
  text-align: center;
}
.md-pagination a {
  display: inline-block;
  padding: 6px 10px;
  margin: 0 4px;
  background: #eee;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
}
.md-pagination a.active {
  background: #0073aa;
  color: white;
}

/* ====================
   ALPHABET FILTER
==================== */
#alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  flex: 1 1 100%;
  width: 100%;
}
.alpha-btn {
  background: #eee;
  border: 1px solid #ccc;
  padding: 5px 10px;
  margin: 2px;
  cursor: pointer;
}
.alpha-btn:hover {
  background: #ddd;
}
.alpha-btn.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* ====================
   DASHBOARD FORM STYLES
==================== */
.md-dashboard .row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.md-dashboard .md-half {
  flex: 1 0 540px;
  padding: 10px;
}
.md-dashboard .md-full {
  width: 100%;
  padding-left: 10px;
}
.md-dashboard label {
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}
.md-dashboard input[type="text"],
.md-dashboard input[type="email"],
.md-dashboard input[type="file"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
}
/* Optional: Adjust dropdown width, padding, font */
.md-select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  font-size: 14px;
  height:40px;
}

/* ====================
   CHILD ENTRY FIELDS
==================== */
#children-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.child-entry {
  position: relative;
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 15px 20px;
  border-radius: 8px;
  width: 48%;
  box-sizing: border-box;
}
.child-entry input,
.child-entry select {
  width: 98%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  height: 50px;
}
.remove-child-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: red;
  cursor: pointer;
}
.remove-child-btn:hover {
  color: #b30000;
}


/* ====================
   BUTTONS
==================== */
#custom-upload-btn,
#add-child-btn,
.md-update-btn {
  padding: 10px 20px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  margin-top: 10px;
  margin-bottom:10px;
}
#custom-upload-btn:hover,
#add-child-btn:hover,
.md-update-btn:hover {
  background-color: #005f8d;
}

/* ====================
   LOGIN FORM
==================== */
.login-form {
  max-width: 400px;
  margin: 40px auto;
  background: #f9f9f9;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  text-align: center;
  height:500px;
}
.login-form h2 {
  color: #0073aa;
  margin-bottom: 20px;
}
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="submit"] {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 25px;
  font-size: 16px;
}
.login-form input[type="submit"] {
  background-color: #0073aa;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
.login-form input[type="submit"]:hover {
  background-color: #005c8e;
}
.login-form .toggle-password {
  position: absolute;
  top: 36%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

/* Restore input width for registration fields */
.md-registration-form input,
.md-registration-form select {
    width: 48%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
    margin-left: 10px;
    border-radius: 20px;
    height: 46px;
    box-sizing: border-box;
}

/* Ensure full-width textarea or special fields */
.md-registration-form input[type="file"],
.md-registration-form textarea,
.md-registration-form input.address-field {
    width: 100% !important;
}

/* Fix child layout */
.md-registration-form .child-entry input,
.md-registration-form .child-entry select {
    width: 98% !important;
    margin-left: 0;
    margin-right: 0;
}


/* ======================
   PASSWORD CHANGE PAGE
====================== */

.md-password-change {
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: inherit;
}

.md-password-change h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 24px;
  color: #333;
}

.md-password-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.md-password-form label {
  font-weight: 500;
  color: #555;
}

.md-password-form input[type="password"] {
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.md-password-form input[type="password"]:focus {
  border-color: #0073aa;
  outline: none;
}

.md-password-form input[type="submit"] {
  background-color: #0073aa;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.md-password-form input[type="submit"]:hover {
  background-color: #005d8f;
}

.md-password-change p {
  text-align: center;
  margin-top: 15px;
  font-weight: 500;
}


/* Responsive fix */
@media (max-width: 768px) {
    .md-registration-form input,
    .md-registration-form select {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Declaration section */
.declaration-radio {
    align-items: left;
    gap: 10px;
    font-size: 16px;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 20px;
}

.declaration-radio input[type="radio"] {
    transform: scale(1.2);
    margin: 0;
    accent-color: #0073aa;
    width: 20px;
  height: 20px;
  padding: 10px!important;
}
.declaration-radio span{ line-height: 40px;}
.md-registration-form h3{ padding-bottom:12px; padding-top:12px; }
.form-heading{ padding-top:20px; text-align:center;}


/* Hide the default file input */
.hidden-file-input {
  display: none!important;
}

/* Stylish custom upload button */
.custom-upload-btn {
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.custom-upload-btn:hover {
  background-color: #005f8d;
}

/* Feedback area for showing selected file name or status */
#image-upload-feedback {
  margin-top: 10px;
  font-size: 14px;
}

.md-modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  position: relative;
}

.md-modal-content .md-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}



/* ✅ Responsive Navigation and Alphabet Filter */
@media (max-width: 768px) {
  .md-container nav ul,
  .md-dashboard nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 15px;
  }

  .md-container nav ul li,
  .md-dashboard nav ul li {
    display: block;
    width: 100%;
  }

  .md-container nav ul li a,
  .md-dashboard nav ul li a {
    display: block;
    width: 100%;
    padding: 10px;
    background: #0073aa;
    color: white;
    border-radius: 5px;
    text-align: center;
  }

  .md-container nav ul li a:hover,
  .md-dashboard nav ul li a:hover {
    background: #005c8e;
  }
    .md-directory-header {
    flex-direction: column;
    align-items: stretch;}

    #alphabet-filter {
    justify-content: center;
  }

  .alpha-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 13px;
  

  .md-directory-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .member-card img {
    max-width: 100px;
    height: auto;
  }
    .child-entry {
    width: 100%;
  }
  .md-dashboard .md-half {
    flex: 1 0 100%;
  }
}
