/**
 * LLMs Optimization Feature Styles
 *
 * Dedicated styles for the LLMs.txt optimization page
 * Ensures consistent design with ProRank standards
 *
 * @since 3.0.0
 */

/* ============================================
   LLMS OPTIMIZATION PAGE
   ============================================ */

.prorank-llms-optimization-tab {
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   INTRO CARD
   ============================================ */

.prorank-llms-intro {
  margin-bottom: 24px;
}

.prorank-llms-intro .prorank-card-body {
  padding: 24px;
  background: #ffffff;
}

.prorank-llms-intro h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.prorank-llms-intro p {
  margin: 0 0 16px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
}

.prorank-llms-intro p:last-child {
  margin-bottom: 0;
}

/* ============================================
   SETTINGS CARD
   ============================================ */

.prorank-llms-settings {
  margin-bottom: 24px;
}

.prorank-llms-settings .prorank-card-header {
  background-color: #f5f5f5 !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.prorank-llms-settings .prorank-card-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
}

.prorank-llms-settings .prorank-card-body {
  padding: 24px;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.prorank-form-group {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid #e5e7eb;
}

.prorank-form-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prorank-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.prorank-form-help {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ============================================
   RADIO GROUP STYLING
   ============================================ */

.prorank-radio-group {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.prorank-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.prorank-radio-group label:hover {
  background-color: #f9fafb;
}

.prorank-radio-group input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--prorank-primary);
}

/* ============================================
   PANEL FOR AUTOMATIC SETTINGS
   ============================================ */

.prorank-panel {
  margin-top: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.prorank-panel-body {
  padding: 20px;
}

.prorank-panel-title {
  margin: 0 0 20px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

/* Toggle spacing within panels - Professional layout */
.prorank-panel .prorank-toggle-professional {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  margin-bottom: 12px !important;
}

.prorank-panel .prorank-toggle-professional:last-child {
  margin-bottom: 0 !important;
}

.prorank-panel .prorank-toggle-professional:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

/* ============================================
   MAX PAGES INPUT
   ============================================ */

.prorank-llms-max-pages {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.prorank-llms-max-pages label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin: 0;
}

.prorank-llms-max-pages input[type="number"] {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.prorank-llms-max-pages input[type="number"]:focus {
  outline: none;
  border-color: var(--prorank-primary);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

/* ============================================
   ACTIONS SECTION
   ============================================ */

.prorank-llms-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* ============================================
   FILE GENERATION CARD
   ============================================ */

.prorank-llms-generation {
  margin-bottom: 24px;
}

.prorank-llms-generation .prorank-card-header {
  background-color: #f5f5f5 !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.prorank-llms-generation .prorank-card-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
}

.prorank-llms-generation .prorank-card-body {
  padding: 24px;
}

/* ============================================
   STATUS SECTION
   ============================================ */

.prorank-llms-status {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.prorank-llms-status p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.prorank-llms-status p:last-child {
  margin-bottom: 0;
}

.prorank-llms-status strong {
  color: #1f2937;
  font-weight: 600;
}

/* ============================================
   FILE URLS LIST
   ============================================ */

.prorank-llms-urls {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.prorank-llms-urls p {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.prorank-llms-urls ul {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: disc;
}

.prorank-llms-urls li {
  margin: 6px 0;
  font-size: 13px;
  color: #4b5563;
}

.prorank-llms-urls a {
  color: var(--prorank-primary);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease;
}

.prorank-llms-urls a:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* ============================================
   GENERATION ACTIONS
   ============================================ */

.prorank-llms-generation-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.prorank-llms-generation-actions .prorank-button {
  min-width: 140px;
}

/* ============================================
   VIEW FILES SECTION
   ============================================ */

.prorank-llms-view-files {
  display: flex;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
}

.prorank-llms-view-files .prorank-button {
  padding: 0;
  height: auto;
  font-size: 14px;
  color: var(--prorank-primary);
  text-decoration: none;
}

.prorank-llms-view-files .prorank-button:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* ============================================
   LOADING STATE
   ============================================ */

.prorank-llms-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.prorank-llms-loading p {
  margin-top: 16px;
  font-size: 14px;
  color: #6b7280;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .prorank-radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .prorank-llms-max-pages {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .prorank-llms-generation-actions {
    flex-direction: column;
  }

  .prorank-llms-generation-actions .prorank-button {
    width: 100%;
  }

  .prorank-llms-view-files {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============================================
   OVERRIDE ANY CONFLICTING STYLES
   ============================================ */

/* Ensure professional layout for all toggles on this page */
.prorank-llms-optimization-tab .prorank-toggle-professional {
  max-width: 100% !important;
  margin-bottom: 20px !important;
}

/* Remove any centered alignment */
.prorank-llms-optimization-tab .prorank-toggle-professional .prorank-toggle {
  margin-left: auto !important;
  position: relative !important;
}

/* First main toggle in settings */
.prorank-llms-settings > .prorank-card-body > .prorank-toggle-professional:first-child {
  margin-bottom: 24px !important;
  padding: 20px !important;
  background: #f9fafb !important;
  border: 2px solid #e5e7eb !important;
}