/**
 * AuthAPI Custom Styles - Site Theme Integration
 * Colors: #1F1D0D (primary dark), #F7FF62 (bright yellow), #FFD32B (golden yellow)
 * Font: Roboto
 */

/* Alert Styling with Site Theme */
.alert {
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-width: 1px;
  border-style: solid;
  font-size: 15px;
  line-height: 1.6;
  font-family: "Roboto", sans-serif;
}

.alert-success {
  background: rgba(247, 255, 98, 0.1);
  border-color: #FFD32B;
  color: #1F1D0D;
}

.alert-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  color: #991b1b;
}

.alert-info {
  background: rgba(247, 255, 98, 0.1);
  border-color: #FFD32B;
  color: #1F1D0D;
}

.alert-warning {
  background: rgba(255, 210, 43, 0.1);
  border-color: #FFD32B;
  color: #1F1D0D;
}

.alert i {
  margin-right: 8px;
}

.alert strong {
  font-weight: 700;
}

/* Field Validation Messages */
.field-validation {
  display: none;
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
  font-weight: 500;
}

/* Form Input Focus States */
.form_item input:focus,
.register_form input:focus,
.signup_login_form input:focus {
  outline: none;
  border-color: #FFD32B !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 210, 43, 0.15) !important;
  transition: all 0.3s ease;
}

/* Error State for Form Inputs */
.form_item input.is-invalid,
.register_form input.is-invalid,
.signup_login_form input.is-invalid {
  border-color: #dc3545 !important;
  border-width: 2px;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Forgot Password Modal Styling */
.modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  font-family: "Roboto", sans-serif;
}

.modal-header {
  background: #1F1D0D;
  color: #F7FF62;
  border-radius: 0;
  padding: 18px 24px;
  border-bottom: none;
}

.modal-header .modal-title {
  font-weight: 700;
  font-size: 18px;
  color: #F7FF62;
  font-family: "Roboto", sans-serif;
}

.modal-header .btn-close {
  filter: brightness(0) saturate(100%) invert(97%) sepia(100%) saturate(1356%) hue-rotate(359deg) brightness(104%) contrast(104%);
  opacity: 1;
  font-size: 20px;
  padding: 0;
  width: 28px;
  height: 28px;
  background: transparent;
}

.modal-header .btn-close:hover {
  opacity: 0.8;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

.modal-body {
  padding: 28px 24px;
  background: white;
}

.modal-body h6 {
  color: #29281E;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 15px;
  font-family: "Roboto", sans-serif;
}

.modal-body p {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  border-radius: 0;
  background: white;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal Form Inputs */
.modal-body input.form-control,
.modal-body .form-control {
  border-radius: 6px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
  font-family: "Roboto", sans-serif;
  color: #29281E;
}

.modal-body input.form-control:focus,
.modal-body .form-control:focus {
  border-color: #FFD32B;
  box-shadow: 0 0 0 0.2rem rgba(255, 210, 43, 0.15);
  outline: none;
}

.modal-body input.form-control.is-invalid,
.modal-body .form-control.is-invalid {
  border-color: #dc3545;
  border-width: 1px;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.modal-body .invalid-feedback {
  display: block;
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 400;
}

.modal-body .form-label,
.modal-body label {
  font-weight: 600;
  color: #29281E;
  margin-bottom: 6px;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
}

/* Modal Buttons */
.modal-footer .btn,
.modal-body .btn {
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
  font-family: "Roboto", sans-serif;
  cursor: pointer;
}

.modal-footer .btn-primary,
.modal-body .btn-primary {
  background: #1F1D0D;
  color: #ffffff;
  box-shadow: none;
  border: 1px solid #1F1D0D;
}

.modal-footer .btn-primary:hover,
.modal-body .btn-primary:hover {
  background: #FFD32B;
  color: #1F1D0D;
  border-color: #FFD32B;
  box-shadow: 0 4px 12px rgba(255, 210, 43, 0.3);
}

.modal-footer .btn-success,
.modal-body .btn-success {
  background: #1F1D0D;
  color: #ffffff;
  box-shadow: none;
  border: 1px solid #1F1D0D;
}

.modal-footer .btn-success:hover,
.modal-body .btn-success:hover {
  background: #FFD32B;
  color: #1F1D0D;
  border-color: #FFD32B;
  box-shadow: 0 4px 12px rgba(255, 210, 43, 0.3);
}

.modal-footer .btn-secondary,
.modal-body .btn-secondary {
  background: #6c757d;
  color: white;
  box-shadow: none;
  border: 1px solid #6c757d;
}

.modal-footer .btn-secondary:hover,
.modal-body .btn-secondary:hover {
  background: #5a6268;
  border-color: #5a6268;
}

.modal-footer .btn-link,
.modal-body .btn-link {
  color: #1F1D0D;
  text-decoration: none;
  font-weight: 600;
}

.modal-footer .btn-link:hover,
.modal-body .btn-link:hover {
  color: #FFD32B;
  text-decoration: underline;
}

/* Loading Spinner in Buttons */
.btn .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success Message Card Styling */
.success-card {
  background: rgba(247, 255, 98, 0.08);
  border: 1px solid #FFD32B;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 210, 43, 0.15);
  margin-bottom: 20px;
}

.success-card .icon-wrapper {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: #1F1D0D;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(31, 29, 13, 0.2);
}

.success-card .icon-wrapper i {
  font-size: 2rem;
  color: #F7FF62;
}

.success-card h3 {
  color: #1F1D0D;
  margin-bottom: 12px;
  font-weight: 700;
  font-family: "Roboto", sans-serif;
}

.success-card p {
  color: #29281E;
  margin-bottom: 8px;
  font-size: 15px;
  font-family: "Roboto", sans-serif;
}

.success-card .text-muted {
  color: #6c757d !important;
  font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .alert {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .modal-body,
  .modal-footer {
    padding: 20px;
  }
  
  .success-card {
    padding: 24px;
  }
  
  .success-card .icon-wrapper {
    width: 64px;
    height: 64px;
  }
  
  .success-card .icon-wrapper i {
    font-size: 2rem;
  }
}

/* Dashboard Dropdown Styling */
.dropdown-menu {
  border-radius: 6px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 200px;
  font-family: "Roboto", sans-serif;
}

.dropdown-item {
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s ease;
  color: #29281E;
}

.dropdown-item:hover {
  background: #F6F6F6;
  color: #1F1D0D;
}

.dropdown-item i {
  width: 20px;
  text-align: center;
}

.dropdown-item.text-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

.dropdown-divider {
  margin: 8px 0;
  border-color: #ddd;
}

/* Profile Avatar Styling */
.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1F1D0D;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F7FF62;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(31, 29, 13, 0.2);
  font-family: "Roboto", sans-serif;
}

/* Custom Button Hover Effects for Auth Pages */
.btn_dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 210, 43, 0.3) !important;
}

.border_dark:hover {
  background: #1F1D0D !important;
  color: #F7FF62 !important;
  border-color: #1F1D0D !important;
}

/* Link Colors */
a[style*="color"] {
  color: #1F1D0D !important;
}

a[style*="color"]:hover {
  color: #FFD32B !important;
  text-decoration: underline;
}

/* Checkbox Styling for Consent */
.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #FFD32B;
  cursor: pointer;
}

.consent label {
  cursor: pointer;
}

.consent span {
  transition: color 0.2s ease;
}

/* Small Text Links */
.small-text {
  font-size: 14px;
  color: #6c757d;
  margin-top: 20px;
}

.small-text a {
  color: #1F1D0D;
  text-decoration: none;
  font-weight: 600;
}

.small-text a:hover {
  text-decoration: underline;
  color: #FFD32B;
}


/* Profile Dropdown Styling */
.profile-dropdown {
  position: relative;
  display: block;
}

.profile-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-toggle:hover {
  border-color: #FFD32B;
  box-shadow: 0 2px 8px rgba(255, 210, 43, 0.2);
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1F1D0D 0%, #3a3620 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F7FF62;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
}

.profile-name {
  font-weight: 600;
  color: #1F1D0D;
  font-size: 14px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-toggle i.fa-chevron-down {
  color: #6b7280;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.profile-dropdown:hover .profile-toggle i.fa-chevron-down {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.profile-dropdown:hover .profile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.profile-menu ul li {
  margin: 0;
}

.profile-menu ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #1F1D0D;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.profile-menu ul li a:hover {
  background: rgba(247, 255, 98, 0.1);
  color: #1F1D0D;
}

.profile-menu ul li a i {
  width: 18px;
  color: #6b7280;
  font-size: 16px;
}

.profile-menu ul li a:hover i {
  color: #FFD32B;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .profile-dropdown {
    position: static;
  }
  
  .profile-name {
    display: none;
  }
  
  .profile-menu {
    right: -10px;
  }
}
