/* Authentication Modal Styles */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.auth-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.auth-modal-overlay.active .auth-modal {
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.3s ease;
}

.auth-modal-close:hover {
  color: #333;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.auth-tab.active {
  color: #333;
  border-bottom-color: #36648a;
}

.auth-tab:hover {
  color: #666;
}

/* Auth Header */
.auth-header {
  margin-bottom: 30px;
  text-align: center;
}

.auth-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}

.auth-header p {
  color: #666;
  font-size: 14px;
}

/* Auth Form Container */
.auth-form-container {
  display: none;
}

.auth-form-container.active {
  display: block;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.form-group input[type='tel'],
.form-group input[type='text'],
.form-group input[type='email'] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #36648a;
}

.form-group input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #999;
}

/* Form Row (for side by side inputs) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Gender Options */
.gender-options {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

.radio-label input[type='radio'] {
  margin-right: 8px;
}

/* Auth Button */
.btn-auth {
  width: 100%;
  padding: 14px 20px;
  background: #36648a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.btn-auth:hover {
  background: #36648a;
}

.btn-link {
  background: none;
  border: none;
  color: #36648a;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
  margin-top: 10px;
}

.btn-link:hover {
  color: #36648a;
}

/* Loader */
.auth-loader {
  text-align: center;
  padding: 20px;
}

.auth-loader .spinner-border {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: #36648a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-loader p {
  margin-top: 10px;
  color: #666;
  font-size: 14px;
}

/* Error Message */
.auth-error {
  background: #fee;
  color: #c33;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 15px;
  text-align: center;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.auth-footer p {
  color: #666;
  font-size: 14px;
}

.auth-footer a {
  color: #36648a;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Services Loading Styles */
.services-loading {
  padding: 60px 20px;
  text-align: center;
}

.services-loading .spinner-border {
  width: 50px;
  height: 50px;
  border: 5px solid #f0f0f0;
  border-top-color: #36648a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.services-loading p {
  color: #666;
  font-size: 16px;
}

/* Services Error Styles */
.services-error {
  padding: 60px 20px;
  text-align: center;
}

.services-error i {
  font-size: 48px;
  color: #36648a;
  margin-bottom: 20px;
}

.services-error p {
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
}

.services-error button {
  margin-top: 15px;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ================================================ */
/* Confirmation Modal Styles */
/* ================================================ */

.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.confirm-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.confirm-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  padding: 40px 35px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(-20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.confirm-modal-overlay.active .confirm-modal {
  transform: scale(1) translateY(0);
}

.confirm-icon {
  margin-bottom: 20px;
}

.confirm-icon i {
  font-size: 64px;
  color: #36648a;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.confirm-modal h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
}

.confirm-modal p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions button {
  flex: 1;
  max-width: 150px;
  padding: 12px 24px !important;
  font-size: 15px !important;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#confirmCancelBtn {
  background: #6c757d !important;
  color: #fff !important;
}

#confirmCancelBtn:hover {
  background: #5a6268 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#confirmOkBtn {
  background: #36648a !important;
  color: #fff !important;
}

#confirmOkBtn:hover {
  background: #36648a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(54, 100, 138, 0.4);
}

/* ================================================ */
/* Toast Notification Styles */
/* ================================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  pointer-events: auto;
  border-left: 4px solid;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
  to {
    transform: scaleX(0);
  }
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: #333;
}

.toast-message {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

/* Toast Types */
.toast.success {
  border-left-color: #4caf50;
}

.toast.success .toast-icon {
  color: #4caf50;
}

.toast.error {
  border-left-color: #f44336;
}

.toast.error .toast-icon {
  color: #f44336;
}

.toast.warning {
  border-left-color: #ff9800;
}

.toast.warning .toast-icon {
  color: #ff9800;
}

.toast.info {
  border-left-color: #2196f3;
}

.toast.info .toast-icon {
  color: #2196f3;
}

/* Responsive */
@media only screen and (max-width: 767px) {
  .toast-container {
    right: 10px;
    left: 10px;
    top: 10px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  .confirm-modal {
    padding: 30px 25px;
  }

  .confirm-icon i {
    font-size: 52px;
  }

  .confirm-modal h3 {
    font-size: 20px;
  }

  .confirm-modal p {
    font-size: 14px;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions button {
    max-width: 100%;
  }
}
