/* Banner label styles */
.banner-plan-label {
  background: #27ae60;
  color: #fff;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 2px;
}

.banner-searches-label {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.banner-instructions {
  font-size: 10px;
  color: #666;
  text-align: center;
  margin-top: 6px;
  max-width: 100%;
  line-height: 1.4;
  word-break: break-word;
  white-space: normal;
  display: block;
}

/* Responsive: stack and space for mobile */
@media (max-width: 600px) {
  #membership-status-banner {
    padding: 10px 6px !important;
    text-align: center !important;
  }
  
  .banner-plan-label,
  .banner-searches-label,
  .banner-instructions {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .banner-instructions {
    margin-top: 8px !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
  }
}

/* Source Finder Instructions Modal - Isolated System */
.sf-instructions-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-family: 'Open Sans', Arial, sans-serif;
}

.sf-instructions-modal.sf-modal-open {
  opacity: 1;
  visibility: visible;
}

.sf-instructions-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.sf-instructions-modal.sf-modal-open .sf-instructions-modal-content {
  transform: scale(1);
}

.sf-instructions-modal-header {
  background: #2157ac;
  color: white;
  padding: 20px 25px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sf-instructions-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.sf-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.sf-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sf-instructions-modal-body {
  padding: 30px;
}

.sf-process-section {
  margin-bottom: 30px;
}

.sf-process-title {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

.sf-process-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sf-process-step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #2157ac;
}

.sf-step-number {
  background: #2157ac;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.sf-step-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.sf-step-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

.sf-bcc-highlight {
  background: #e8f4fd;
  border: 2px solid #2157ac;
  border-radius: 10px;
  padding: 20px;
  margin: 25px 0;
  text-align: center;
}

.sf-bcc-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.sf-bcc-title {
  font-size: 16px;
  font-weight: 600;
  color: #2157ac;
  margin-bottom: 8px;
}

.sf-bcc-description {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.sf-create-email-section {
  margin-bottom: 30px;
}

.sf-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 8px;
}

.sf-email-details {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #27ae60;
}

.sf-email-details p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

.sf-email-details p:last-child {
  margin-bottom: 0;
}

.sf-good-to-know {
  background: #fff;
  border: 1px solid #ecf0f1;
  border-radius: 8px;
  padding: 20px;
}

.sf-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.sf-feature-item:last-child {
  margin-bottom: 0;
}

.sf-feature-icon {
  color: #2157ac;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.sf-feature-content h5 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.sf-feature-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sf-instructions-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .sf-instructions-modal-header {
    padding: 15px 20px;
  }
  
  .sf-instructions-modal-header h3 {
    font-size: 16px;
  }
  
  .sf-instructions-modal-body {
    padding: 20px;
  }
  
  .sf-process-title {
    font-size: 18px;
  }
  
  .sf-process-step {
    padding: 15px;
  }
  
  .sf-step-content h4 {
    font-size: 15px;
  }
  
  .sf-step-content p {
    font-size: 13px;
  }
  
  .sf-bcc-highlight {
    padding: 15px;
  }
  
  .sf-section-title {
    font-size: 16px;
  }
}
/* Subtle Instructions Link - Positioned after membership banner */
.sf-instructions-link {
  text-align: center;
  margin: 15px 0;
  font-family: 'Open Sans', Arial, sans-serif;
}

.sf-instructions-link-btn {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px dotted #999;
}

.sf-instructions-link-btn:hover {
  color: #2157ac;
  text-decoration: none;
  border-bottom: 1px solid #2157ac;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .sf-instructions-link {
    margin: 12px 0;
  }
  
  .sf-instructions-link-btn {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .sf-instructions-link {
    margin-top: 10px;
  }
  
  .sf-instructions-link-btn {
    font-size: 12px;
    padding: 5px 12px;
  }
}

/* Enhanced positioning for email troubleshooting link */
@media (min-width: 769px) {
  .email-troubleshooting-link {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    margin: 10px 0;
  }
}

/* Show help link more prominently when email selections exist */
.has-email-selections .email-troubleshooting-link {
  background: rgba(230, 126, 34, 0.05);
  border: 1px solid rgba(230, 126, 34, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.has-email-selections .email-help-button {
  color: #d35400;
  font-weight: 600;
}

/* Enhanced Search Parameter Validation Styles */
.dropdown-container {
  position: relative;
  transition: all 0.2s ease;
}

.dropdown-container.validation-valid .searchable-dropdown input {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.dropdown-container.validation-invalid .searchable-dropdown input {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.dropdown-container::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  /* NEW: Position relative to input field height */
  margin-top: 14px; /* Adjust for label spacing */
}

.dropdown-container.validation-valid::after {
  content: '✓';
  color: #28a745;
  font-weight: bold;
  font-size: 14px;
  opacity: 1;
}

.dropdown-container.validation-invalid::after {
  content: '✗';
  color: #dc3545;
  font-weight: bold;
  font-size: 14px;
  opacity: 1;
}

/* Mobile responsive validation */
@media (max-width: 768px) {
  .dropdown-container::after {
    right: 8px;
    width: 14px;
    height: 14px;
    font-size: 12px;
  }
}

/* Material Expert Concierge Button */
.material-concierge-btn {
  background: transparent;
  color: #2b2d30;
  border: 1px solid #2b2d30;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.material-concierge-btn:hover {
  background: #2b2d30;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 45, 48, 0.3);
}

.material-concierge-btn:active {
  background: #2b2d30;
  border-color: #2b2d30;
  transform: translateY(0);
}

/* Mobile responsive adjustments for banner */
@media (max-width: 600px) {
  #membership-status-banner {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
  
  .material-concierge-btn {
    margin-left: 0 !important;
    margin-top: 8px;
    order: 3;
  }
  
  .banner-plan-label,
  .banner-searches-label {
    order: 1;
  }
  
  .banner-instructions {
    order: 2;
  }
}
/* Email Troubleshooting Help Link and Modal */
.email-troubleshooting-link {
  margin: 8px 0 0 0;
  text-align: left;
}

.email-help-button {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 4px !important;
  margin-left: 8px !important;
  font-size: 13px !important;
  color: #666 !important;
  text-decoration: underline dotted #999 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  display: inline !important;
  vertical-align: baseline !important;
}

.email-help-button:hover {
  color: #2157ac !important;
  text-decoration: underline solid #2157ac !important;
}

/* Email Troubleshooting Modal */
.email-troubleshooting-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-family: 'Open Sans', Arial, sans-serif;
}

.email-troubleshooting-modal.modal-open {
  opacity: 1;
  visibility: visible;
}

.email-troubleshooting-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.email-troubleshooting-modal.modal-open .email-troubleshooting-modal-content {
  transform: scale(1);
}

.email-troubleshooting-modal-header {
  background: #2157ac;
  color: white;
  padding: 20px 25px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.email-troubleshooting-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: white;
}

#close-email-help-modal {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

#close-email-help-modal:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.email-troubleshooting-modal-body {
  padding: 30px;
}
.email-troubleshooting-modal-body,
.troubleshooting-content,
.troubleshooting-section,
.os-subsection,
.browser-subsection,
.webmail-subsection,
.troubleshooting-intro,
.help-contact {
  text-align: left !important;
}

.troubleshooting-intro {
  background: #f8f9fa;
  border-left: 4px solid #2157ac;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 0 8px 8px 0;
}

.troubleshooting-intro p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #2c3e50;
}

.troubleshooting-intro p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

/* Collapsible Sections */
.troubleshooting-section {
  margin-bottom: 20px;
  border: 1px solid #ecf0f1;
  border-radius: 8px;
  overflow: hidden;
}

.troubleshooting-toggle {
  width: 100%;
  background: #f8f9fa;
  border: none;
  padding: 15px 20px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.troubleshooting-toggle:hover {
  background: #ecf0f1;
}

.toggle-icon {
  margin-right: 10px;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.troubleshooting-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.troubleshooting-content {
  display: none;
  padding: 20px;
  background: white;
}

.troubleshooting-content.expanded {
  display: block;
}

/* Subsections */
.os-subsection,
.browser-subsection,
.webmail-subsection {
  margin-bottom: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.os-subsection .troubleshooting-toggle,
.browser-subsection .troubleshooting-toggle,
.webmail-subsection .troubleshooting-toggle {
  background: #fdfdfd;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.os-subsection .troubleshooting-content,
.browser-subsection .troubleshooting-content,
.webmail-subsection .troubleshooting-content {
  padding: 15px;
  background: #fefefe;
  border-top: 1px solid #f0f0f0;
}

/* Instructions Styling */
.troubleshooting-content ol {
  margin: 0 0 15px 0;
  padding-left: 20px;
}

.troubleshooting-content li {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 14px;
  color: #2c3e50;
}

.troubleshooting-note {
  background: #e8f4fd;
  border: 1px solid #2157ac;
  border-radius: 4px;
  padding: 10px;
  font-size: 13px;
  color: #2157ac;
  margin-top: 15px;
}

.troubleshooting-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #ecf0f1;
}

/* Mobile-specific troubleshooting sections */
.mobile-subsection {
  margin-bottom: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.mobile-subsection .troubleshooting-toggle {
  background: #fdfdfd;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.mobile-subsection .troubleshooting-content {
  padding: 15px;
  background: #fefefe;
  border-top: 1px solid #f0f0f0;
}

.mobile-subsection h4 {
  color: #2157ac;
  font-size: 14px;
  font-weight: 600;
  margin: 15px 0 8px 0;
}

.mobile-subsection ul {
  margin: 8px 0 15px 0;
  padding-left: 20px;
}

.mobile-subsection ul li {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.4;
}

.help-contact {
  background: #f0f8ff;
  border: 2px solid #2157ac;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.help-contact h4 {
  color: #2157ac;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.help-contact p {
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #2c3e50;
}

.help-contact p:last-child {
  margin-bottom: 0;
  font-weight: 600;
  color: #27ae60;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .email-troubleshooting-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .email-troubleshooting-modal-header {
    padding: 15px 20px;
  }
  
  .email-troubleshooting-modal-header h3 {
    font-size: 18px;
  }
  
  .email-troubleshooting-modal-body {
    padding: 20px;
  }
  
  .troubleshooting-toggle {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .troubleshooting-content {
    padding: 15px;
  }
  
  .email-help-button {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .troubleshooting-intro {
    padding: 15px;
  }
  
  .troubleshooting-toggle {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .help-contact {
    padding: 15px;
  }
}

/* Mobile Email Actions Layout */
.mobile-email-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 15px;
}

.mobile-email-actions .create-email-btn {
  margin-bottom: 0;
}

.mobile-email-actions .email-help-button {
  margin-left: 0 !important;
  font-size: 12px !important;
}

/* Results Header Email Controls - Ensure proper spacing */
.email-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-controls .email-help-button {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .email-controls {
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
  }
  
  .email-controls .email-help-button {
    font-size: 11px !important;
  }
}

/* Reset Search Warning Styles - Condensed Version */
.reset-search-warning {
  margin-top: 8px;
  font-family: 'Open Sans', Arial, sans-serif;
  text-align: center;
}

.reset-search-warning .warning-text {
  font-size: 12px;
  color: #333; /* Standard text color */
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.3;
}

.reset-warning-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 4px !important;
  margin: 0 !important;
  font-size: 11px !important;
  color: #666 !important; /* Changed to match existing tooltip links */
  text-decoration: underline dotted #666 !important; /* Gray dotted underline */
  font-weight: 400 !important;
  cursor: pointer !important;
  display: inline !important;
  vertical-align: baseline !important;
}

.reset-warning-btn:hover {
  color: #2157ac !important; /* Changed to match existing tooltip hover */
  text-decoration: underline solid #2157ac !important; /* Blue solid underline on hover */
}

/* Mobile responsive */
@media (max-width: 768px) {
  .reset-search-warning .warning-text {
    font-size: 11px;
  }
  
  .reset-warning-btn {
    font-size: 10px !important;
  }
}

/* Reset Warning Modal Close Button Fix */
#close-reset-warning-modal {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Source card layout rearrangement - Materials/Shapes side-by-side, Grades/Website/Contact full-width */
.detail-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.detail-half {
  flex: 1;
  margin-bottom: 0 !important;
}

.detail-full {
  width: 100%;
  margin-bottom: 15px;
  display: block;
}

.detail-group.detail-full:last-child {
  margin-bottom: 0;
}

/* Mobile responsive adjustments for source card layout */
@media (max-width: 768px) {
  .detail-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .detail-half {
    margin-bottom: 15px !important;
  }
}

/* Complete source card layout system - moved from global */
.result-details {
  display: block;
  margin-top: 15px;
}

/* Source card layout structure */
.result-details .detail-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.result-details .detail-half {
  flex: 1;
  margin-bottom: 0 !important;
}

.result-details .detail-full {
  width: 100%;
  margin-bottom: 15px;
  display: block;
  clear: both;
}

.result-details .detail-group.detail-full:last-child {
  margin-bottom: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .result-details .detail-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .result-details .detail-half {
    margin-bottom: 15px !important;
  }
}

/* Account Status Modal Styles */
#account-status-modal-overlay {
  font-family: 'Open Sans', Arial, sans-serif !important;
}

#account-status-modal-overlay h2 {
  font-family: 'Open Sans', Arial, sans-serif !important;
}

#account-status-modal-overlay button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#contact-support-btn:hover {
  background: #a31d0f !important;
}

#close-status-modal:hover {
  background: #f8f9fa !important;
  border-color: #adb5bd !important;
  color: #495057 !important;
}

/* Account Status Warning Banner */
.account-status-warning {
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

