/* EI Students CRUD Styles */
.ei-students-wrapper {
  max-width: 950px;
  margin: auto;
  font-family: Arial, sans-serif;
}

.ei-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
}

.ei-header h3 {
  margin: 0;
  color: #333;
}

.ei-table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ei-students-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.ei-students-table th,
.ei-students-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.ei-students-table th {
  background-color: #007cba;
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.ei-students-table tr:hover {
  background-color: #f5f5f5;
}

.ei-actions {
  white-space: nowrap;
}

.ei-no-data {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 30px;
}

/* Buttons */
.ei-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
  font-size: 14px;
}

.ei-btn-primary {
  background-color: #007cba;
  color: white;
}

.ei-btn-primary:hover {
  background-color: #005a87;
}

.ei-btn-secondary {
  background-color: #6c757d;
  color: white;
}

.ei-btn-secondary:hover {
  background-color: #545b62;
}

.ei-btn-edit {
  background-color: #28a745;
  color: white;
  margin-right: 5px;
}

.ei-btn-edit:hover {
  background-color: #218838;
}

.ei-btn-delete {
  background-color: #dc3545;
  color: white;
}

.ei-btn-delete:hover {
  background-color: #c82333;
}

.ei-btn-small {
  padding: 5px 10px;
  font-size: 12px;
}

/* Modal */
.ei-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.ei-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 5px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.ei-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  padding: 10px 15px;
  cursor: pointer;
}

.ei-close:hover,
.ei-close:focus {
  color: black;
}

/* Form Styles */
.ei-form-wrapper {
  padding: 20px;
}

.ei-form-wrapper h4 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #007cba;
  padding-bottom: 10px;
}

.ei-form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.ei-form-group {
  flex: 1;
}

.ei-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.ei-form-group input[type="number"]#rn {
  max-width: fit-content;
}

.ei-form-group input,
.ei-form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.ei-form-group input:focus,
.ei-form-group select:focus {
  outline: none;
  border-color: #007cba;
}

.ei-form-actions {
  margin-top: 20px;
  text-align: right;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.ei-form-actions .ei-btn {
  margin-left: 10px;
}

/* Notices */
/* .ei-notice {
  padding: 12px 15px;
  margin: 15px 0;
  border-radius: 4px;
} */
.ei-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 25px;
  border-radius: 5px;
  z-index: 9999;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  /* animation: fadeIn 0.3s ease-in-out; */
}
.ei-notice-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.ei-notice-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
  .ei-header {
    flex-direction: column;
    gap: 10px;
  }

  .ei-form-row {
    flex-direction: column;
  }

  .ei-students-table th,
  .ei-students-table td {
    padding: 8px 4px;
    font-size: 12px;
  }

  .ei-modal-content {
    margin: 10% auto;
    width: 95%;
  }
}

/* Loading state */
.ei-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.ei-loading:after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ## ## */

.ei-students-table tr.male {
  background-color: #e3f2fd; /* Light blue for male */
}

.ei-students-table tr.female {
  background-color: #fce4ec; /* Light pink for female */
}

/*  */

/* Status select dropdown styling */
.ei-status-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  min-width: 80px;
}

.ei-status-select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 1px #007cba;
}

.ei-status-select option[value="1"] {
  color: #155724;
  background-color: #d4edda;
}

.ei-status-select option[value="0"] {
  color: #721c24;
  background-color: #f8d7da;
}

/* Row styling based on status */
/* .ei-row-active {
  background-color: rgba(212, 237, 218, 0.3) !important;
}

.ei-row-inactive {
  background-color: rgba(248, 215, 218, 0.3) !important;
  opacity: 0.7;
} */

/* Password modal styling */
.ei-password-modal-content {
  max-width: 400px;
  margin: 10% auto;
}

.ei-password-form {
  padding: 20px;
}

.ei-password-form h4 {
  color: #d73502;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.ei-password-form h4:before {
  content: "⚠️";
  margin-right: 8px;
  font-size: 20px;
}

.ei-password-form p {
  margin-bottom: 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.ei-password-form .ei-form-group {
  margin-bottom: 20px;
}

.ei-password-form input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.ei-password-form input[type="password"]:focus {
  outline: none;
  border-color: #d73502;
  box-shadow: 0 0 0 2px rgba(215, 53, 2, 0.2);
}

/* Danger button styling */
.ei-btn-danger {
  background-color: #d73502;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.ei-btn-danger:hover {
  background-color: #c12e02;
}

.ei-btn-danger:active {
  background-color: #a02502;
}

/* Filter controls styling */
.ei-filter-controls {
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ei-filter-controls label {
  font-weight: 500;
  color: #333;
}

.ei-filter-controls select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 13px;
}

/* Header controls layout */
.ei-header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Update existing gender row styles to work with status */
.ei-students-table tr.male.ei-row-inactive {
  background: linear-gradient(90deg, #e3f2fd 40%, #ccc 60%);
}

.ei-students-table tr.female.ei-row-inactive {
  background: linear-gradient(90deg, #fce4ec 40%, #ccc 60%);
}

/* Inactive rows override gender colors */
/* .ei-students-table tr.ei-row-inactive {
  background-color: rgba(248, 215, 218, 0.3) !important;
} */

/* Loading overlay for password verification */
.ei-password-form .ei-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}
