/* Alert Dialog Styling */
.alert-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  max-width: 500px;
  width: 90%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-out;
  overflow: hidden;
  display: none;
}

.alert-dialog.show {
  display: block;
}

.alert-dialog-content {
  padding: 25px 30px;
  position: relative;
}

.alert-dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s;
}

.alert-dialog-close:hover {
  color: #343a40;
}

.alert-dialog-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.alert-dialog-message {
  margin-bottom: 0;
  line-height: 1.5;
}

.alert-dialog-success {
  border-top: 4px solid #28a745;
}

.alert-dialog-success .alert-dialog-title {
  color: #28a745;
}

.alert-dialog-error {
  border-top: 4px solid #dc3545;
}

.alert-dialog-error .alert-dialog-title {
  color: #dc3545;
}

.alert-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  display: none;
  animation: fadeIn 0.3s;
}

.alert-dialog-overlay.show {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Registration Form Styles */
.registration-form .form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.registration-form .form-section h6 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f8f9fa;
  font-weight: 600;
}

.registration-form .form-group {
  margin-bottom: 1.25rem;
}

.registration-form .form-control {
  height: calc(2.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.registration-form .form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.registration-form .form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.registration-form .invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #dc3545;
}

.registration-form .is-invalid ~ .invalid-feedback {
  display: block;
}

/* Custom file input */
.registration-form .custom-file-label::after {
  content: "Browse";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: block;
  height: calc(2.5em + 0.75rem);
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
  color: #495057;
  background-color: #e9ecef;
  border-left: 1px solid #ced4da;
  border-radius: 0 0.25rem 0.25rem 0;
}

.registration-form .custom-file-input:focus ~ .custom-file-label {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Required field indicator */
.required:after {
  content: " *";
  color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .registration-form .form-section {
    padding: 1rem;
  }

  .registration-form .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Animation for form sections */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registration-form .form-section {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Success message */
.alert-success {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Error message */
.alert-danger {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-10px);
  }
  40%,
  80% {
    transform: translateX(10px);
  }
}
