/* Custom styles to fix alignment issues */
/* Fix for close sidebar button */
.close__sidebar {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  height: 40px !important;
  width: 40px !important;
  border: 0 !important;
  background-color: #34B5C0 !important;
  font-size: 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  border-bottom-left-radius: 45px !important;
  color: #fff !important;
  transition: all .3s ease-in-out !important;
  z-index: 999 !important; /* Increased z-index */
  cursor: pointer !important;
  pointer-events: auto !important; /* Ensure clicks are captured */
}

.close__sidebar:hover {
  background-color: #00808B !important;
}

/* Enhanced Mobile Sidebar Fix */

/* Base sidebar styles - ensure consistent width */
.dashboard__sidebar {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  position: relative;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  z-index: 1000;
}

/* Desktop sidebar behavior */
@media screen and (min-width: 768px) {
  .dashboard__sidebar {
    position: relative;
    transform: translateX(0);
  }
  
  .sidebar-closed .dashboard__sidebar,
  body.remove__sidebar .dashboard__sidebar {
    transform: translateX(-280px) !important;
    opacity: 0;
  }
}

/* Mobile sidebar behavior */
@media screen and (max-width: 767px) {
  .dashboard__sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    background-color: #ffffff !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999 !important;
    transform: translateX(0);
    opacity: 1;
  }
  
  /* Hide sidebar on mobile when closed */
  .sidebar-closed .dashboard__sidebar,
  body.remove__sidebar .dashboard__sidebar {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  
  /* Ensure dashboard body takes full width on mobile when sidebar is hidden */
  .sidebar-closed .dashboard__body,
  body.remove__sidebar .dashboard__body {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Add overlay when sidebar is open on mobile */
  .dashboard__inner__wrap:not(.sidebar-closed)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
  }
  
  body.remove__sidebar .dashboard__inner__wrap::before {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* Close button styles */
.close__sidebar {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  height: 40px !important;
  width: 40px !important;
  border: 0 !important;
  background-color: #34B5C0 !important;
  font-size: 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  border-bottom-left-radius: 45px !important;
  color: #fff !important;
  transition: all .3s ease-in-out !important;
  z-index: 999 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.close__sidebar:hover {
  background-color: #00808B !important;
}

/* Hide close button when sidebar is closed */
.sidebar-closed .close__sidebar,
body.remove__sidebar .close__sidebar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ensure dashboard wrapper doesn't overflow on mobile */
@media screen and (max-width: 767px) {
  .dashboard__wrapper {
    overflow-x: hidden !important;
  }
  
  .dashboard__inner__wrap {
    position: relative;
    overflow: visible;
  }
  
  /* Prevent body scroll when sidebar is open on mobile */
  body:not(.remove__sidebar) {
    overflow: hidden;
  }
  
  body.remove__sidebar {
    overflow: auto;
  }
}

.auth__card .auth-logo {
  display: block;
  text-align: center;
  margin: 0 auto 20px;
}

.auth__card .auth-logo img {
  max-width: 200px;
  height: auto;
  margin: 0 auto;
}

/* Center title shape dots */
.section__title span.d-block {
  display: flex !important;
  justify-content: center;
  margin: 16px auto 0;
}

.section__title span.d-block img {
  width: auto;
  height: 4px;
}

/* Footer logo styles */
footer .flex.items-center.gap-3 {
  padding: 0.5rem;
}

footer .flex.items-center.gap-3 img {
  width: auto;
  height: 32px;
  padding: 2px;
}

footer .flex.items-center.gap-3 h2 {
  font-size: 20px;
  padding-left: 4px;
}

/* Enhanced Payment Page Styles */
.payment-card {
  max-width: 550px;
  margin: 0 auto;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
}

.payment-title {
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
}

/* Plan summary section */
.plan-summary {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eaedf2;
}

.plan-details h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.plan-price {
  margin-top: 0.75rem;
  font-weight: 600;
}

.plan-price .currency {
  font-size: 1rem;
  vertical-align: top;
  position: relative;
  top: 0.25rem;
}

.plan-price .amount {
  font-size: 1.75rem;
  color: #333;
  margin: 0 0.25rem;
}

.plan-price .period {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Card element styling */
.card-element-container {
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  background-color: #fff;
  transition: all 0.2s ease;
}

.card-element-container:focus-within {
  border-color: #00818C;
  box-shadow: 0 0 0 3px rgba(0, 129, 140, 0.1);
}

.card-brands {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.card-brand-icon {
  height: 24px;
  width: auto;
  opacity: 0.7;
}

/* Form elements */
.payment-form label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

/* Fix for select dropdown */
.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #1d96a1;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select:focus {
  border-color: #00818C;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(0, 129, 140, 0.25);
}

/* Custom Dropdown Styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #1d96a1;
  text-align: left;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  text-transform: capitalize;
}

.custom-select-trigger:focus {
    border-color: #00818C;
    box-shadow: 0 0 0 0.25rem rgba(0, 129, 140, 0.25);
    outline: 0;
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  text-transform: capitalize;
  color: #093438;
}

.custom-select-option:hover {
  background-color: #00818C;
  color: #fff;
}

/* Survey page select fix - ensures consistent rendering across sessions */
.auth__card .form-select {
  appearance: menulist !important;
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  background-image: none !important;
  padding-right: 0.75rem !important;
  display: block !important;
}

/* Completely hide any Nice Select elements in the auth card */
.auth__card .nice-select {
  display: none !important;
}

/* Ensure the original select elements are always visible */
.auth__card select.no-nice-select {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
}

/* Payment button */
.btn-payment {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  background-color: #00818C;
  border-color: #00818C;
  transition: all 0.2s ease;
}

.btn-payment:hover:not(:disabled) {
  background-color: #006d78;
  border-color: #006d78;
  transform: translateY(-1px);
}

.btn-payment:active:not(:disabled) {
  transform: translateY(0);
}

.btn-payment:disabled {
  background-color: #a3d3d7;
  border-color: #a3d3d7;
  cursor: not-allowed;
}

/* Payment method options */
.payment-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.payment-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e5e7eb;
}

.payment-divider span {
  position: relative;
  background-color: #fff;
  padding: 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.payment-method-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.payment-method-btn {
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.2s ease;
}

.payment-method-btn:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.payment-method-icon {
  height: 30px;
  width: auto;
}

/* Success and error alerts */
.payment-success {
  background-color: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.payment-error {
  background-color: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.success-icon {
  color: #059669;
  font-size: 1.25rem;
}

/* Payment security info */
.payment-security-info {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Links */
.help-link, .cancel-link {
  color: #00818C;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.help-link:hover, .cancel-link:hover {
  color: #006d78;
  text-decoration: underline;
}

/* Custom theme color styles */
.border-custom-primary {
  border-color: #00818C !important;
}

/* Custom switch styling */
.form-check-input.custom-switch:checked {
  background-color: #00818C !important;
  border-color: #00818C !important;
}

.form-check-input.custom-switch:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 129, 140, 0.25) !important;
}

/* List group custom styling */
.list-group-item.active,
.list-group-item.list-group-item-action.active,
button.list-group-item.list-group-item-action.active {
  background-color: #00818C !important;
  border-color: #00818C !important;
  color: #fff !important;
}

/* Button theme styles */
.btn-custom-primary {
  background-color: #00818C !important;
  border-color: #00818C !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-custom-primary:hover {
  background-color: #006d78 !important;
  border-color: #006d78 !important;
  transform: translateY(-1px);
}

.btn-outline-custom-primary {
  color: #00818C !important;
  border-color: #00818C !important;
  background-color: transparent;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-outline-custom-primary:hover {
  color: #fff !important;
  background-color: #00818C !important;
  transform: translateY(-1px);
}

/* Confidence Score Styles */
.confidence-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.confidence-score.high {
  background-color: #e6f4ea;
  color: #1e7e34;
}

.confidence-score.medium {
  background-color: #fff3cd;
  color: #856404;
}

.confidence-score.low {
  background-color: #f8d7da;
  color: #721c24;
}

/* Action Button Styles */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-button i {
  font-size: 18px;
}

/* Compliance Status Styles */
.compliance-status .alert {
  margin-bottom: 1rem;
  border-left-width: 4px;
}

.compliance-status .alert-heading {
  color: inherit;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compliance-status .recommendations {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
}

.compliance-status .recommendations h6 {
  color: #009B9B;
  margin-bottom: 1rem;
}

.compliance-status .recommendations li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

/* Permit Requirements Styles */
.permit-requirements .requirement-item {
  margin-bottom: 1.5rem;
}

.permit-requirements .requirement-item:last-child {
  margin-bottom: 0;
}

.permit-requirements h6 {
  color: #009B9B;
  margin-bottom: 12px;
  font-weight: 600;
}

.permit-requirements ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.permit-requirements ul li i {
  color: #009B9B;
  margin-top: 2px;
}

/* Property Details Styles */
.detail-item {
  margin-bottom: 1rem;
}

.detail-item label {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 4px;
  display: block;
}

.detail-item h6 {
  margin: 0;
  color: #212529;
  font-weight: 500;
}

.property-map {
  height: 100%;
  min-height: 200px;
}

.property-map .map-placeholder {
  height: 100%;
  border: 1px dashed #dee2e6;
  background-color: #f8f9fa;
}

/* Analysis Progress Styles */
.analysis-progress .progress-steps {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  position: relative;
}

.analysis-progress .progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 10px;
}

.analysis-progress .step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: all 0.3s ease;
}

.analysis-progress .progress-step.completed .step-icon {
  background-color: #009B9B;
  border-color: #009B9B;
  color: white;
}

.analysis-progress .step-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.analysis-progress .progress-step.completed .step-label {
  color: #009B9B;
}

/* Custom badge styling */
.badge-custom-primary {
  background-color: #00818C !important;
  color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .payment-card {
    padding: 1.5rem;
  }
  
  .plan-price .amount {
    font-size: 1.5rem;
  }
  
  .payment-method-options {
    gap: 0.5rem;
  }
  
  .payment-method-icon {
    height: 24px;
  }

  .analysis-progress .progress-steps {
    flex-direction: column;
    gap: 15px;
  }

  .analysis-progress .progress-step {
    flex: none;
  }
}
