/* Cải thiện giao diện cho form quên mật khẩu và thông báo */

/* CSS cho modal quên mật khẩu sử dụng class gốc */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1000;
}

.modal-container {
  position: relative;
  background-color: #fff;
  margin: 10vh auto;
  padding: 0;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: modalFadeIn 0.4s ease forwards;
}

@keyframes modalFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header của modal */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #4361ee, #3f51b5);
  color: white;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Body của modal */
.modal-body {
  padding: 2rem 1.5rem;
}

.modal-description {
  margin-bottom: 1.75rem;
  color: #64748b;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Form input */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #334155;
  font-size: 0.9rem;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.input-group input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #f8fafc;
}

.input-group input:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
  background-color: #fff;
}

.input-group input::placeholder {
  color: #94a3b8;
}

/* Footer của modal */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem 1.75rem;
  gap: 1rem;
}

.btn {
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.925rem;
  transition: all 0.2s;
}

.btn-outline {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.btn-outline:hover {
  background-color: #f1f5f9;
  color: #334155;
}

.btn-primary {
  background: linear-gradient(135deg, #4361ee, #3f51b5);
  color: white;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3a56d4, #3849a2);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.25);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

/* Thông báo thành công */
.forgot-success {
  display: none;
  text-align: center;
  padding: 1rem;
}

.forgot-success.active {
  display: block;
  animation: successFadeIn 0.5s ease forwards;
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forgot-success-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.forgot-success-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.75rem;
}

.forgot-success-message {
  color: #64748b;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* Animation cho icon check */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.forgot-success-icon i {
  animation: checkmark 0.5s ease-in-out 0.2s forwards;
  opacity: 0;
  transform: scale(0);
}
