/**
 * ProRank SEO - Internal Linking Settings Styles
 * 2025 Enhanced Version
 * Modern gradient design with teal and cyan theme
 */

/* Container and Layout */
.prorank-internal-linking {
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.prorank-internal-linking-header h1 {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.prorank-internal-linking-header .dashicons {
  font-size: 32px;
  animation: pulse 2s infinite;
}

.prorank-internal-linking-header p {
  margin: 0;
  opacity: 0.95;
  font-size: 16px;
  line-height: 1.6;
}

/* Settings Card */
.prorank-internal-linking-settings {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin-bottom: 25px;
  animation: fadeInUp 0.6s ease-out;
}

.prorank-internal-linking-settings:first-child {
  margin-top: 0;
}

.prorank-internal-linking-settings h2 {
  margin: 0 0 25px 0;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.prorank-internal-linking-settings h2 .dashicons {
  color: #06b6d4;
  font-size: 24px;
}

/* Form Fields */
.prorank-internal-linking-field {
  margin-bottom: 25px;
  animation: fadeIn 0.5s ease-out;
}

.prorank-internal-linking-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #334155;
  font-size: 14px;
}

.prorank-internal-linking-field .components-base-control__label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #334155;
}

.prorank-internal-linking-field input[type="text"],
.prorank-internal-linking-field input[type="number"],
.prorank-internal-linking-field select,
.prorank-internal-linking-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.prorank-internal-linking-field input:focus,
.prorank-internal-linking-field select:focus,
.prorank-internal-linking-field textarea:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Toggle Controls */
.prorank-internal-linking-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.prorank-internal-linking-toggle:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  transform: translateX(5px);
}

.prorank-internal-linking-toggle-info {
  flex: 1;
}

.prorank-internal-linking-toggle-info h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.prorank-internal-linking-toggle-info p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* Field Styles */
.prorank-field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #334155;
  font-size: 14px;
}

.prorank-field-wrapper {
  margin-bottom: 8px;
}

.description {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

/* Checkbox Styles */
.prorank-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.prorank-checkbox-group {
  display: grid;
  gap: 8px;
}

.prorank-checkbox-list {
  margin-top: 8px;
}

.prorank-checkbox-label {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  cursor: pointer;
}

.prorank-checkbox-input {
  margin-right: 8px;
  cursor: pointer;
}

.components-checkbox-control__input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.components-checkbox-control__input:checked {
  background-color: #06b6d4;
  border-color: #06b6d4;
}

/* Textarea Styles */
.prorank-textarea-field {
  width: 100%;
  min-height: 150px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  background: white;
  transition: all 0.3s ease;
}

.prorank-textarea-field:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Number Input Styles */
.prorank-number-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prorank-number-field input[type="number"] {
  width: 100px;
  text-align: center;
}

.prorank-number-field .prorank-field-suffix {
  color: #64748b;
  font-size: 14px;
}

/* Select Control Styles */
.prorank-select-field select {
  cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
}

/* Multi-Select Styles */
.prorank-multi-select {
  position: relative;
}

.prorank-multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.prorank-multi-select-option {
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prorank-multi-select-option:hover {
  background: #f8fafc;
}

.prorank-multi-select-option.selected {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  font-weight: 500;
}

/* Keyword Exclusion Section */
.prorank-keyword-exclusion {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
}

.prorank-keyword-exclusion h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prorank-keyword-exclusion h3 .dashicons {
  color: #f59e0b;
}

.prorank-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.prorank-keyword-tag {
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #fbbf24;
  font-size: 13px;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.prorank-keyword-tag .dashicons {
  font-size: 16px;
  cursor: pointer;
  color: #dc2626;
  transition: transform 0.2s ease;
}

.prorank-keyword-tag .dashicons:hover {
  transform: scale(1.2);
}

/* Advanced Settings */
.prorank-advanced-settings {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e2e8f0;
}

.prorank-advanced-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  cursor: pointer;
  padding: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.prorank-advanced-header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.prorank-advanced-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prorank-advanced-toggle {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.prorank-advanced-toggle.open {
  transform: rotate(180deg);
}

.prorank-advanced-content {
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
  animation: slideDown 0.3s ease-out;
}

/* Info Boxes */
.prorank-info-box {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeIn 0.5s ease;
}

.prorank-info-box .dashicons {
  color: #2563eb;
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.prorank-info-content h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e40af;
}

.prorank-info-content p {
  margin: 0;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}

/* Warning Boxes */
.prorank-warning-box {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  border: 1px solid #fb923c;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.prorank-warning-box .dashicons {
  color: #ea580c;
  font-size: 20px;
  flex-shrink: 0;
}

/* Success Messages */
.prorank-success-message {
  background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
  border: 1px solid #4ade80;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.5s ease;
}

.prorank-success-message .dashicons {
  color: #16a34a;
  font-size: 20px;
}

/* Button Styles */
.prorank-button-group {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.prorank-save-button {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.prorank-save-button:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.prorank-save-button:active {
  transform: translateY(0);
}

.prorank-save-button.saving {
  opacity: 0.7;
  cursor: not-allowed;
}

.prorank-reset-button {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  padding: 12px 24px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.prorank-reset-button:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  transform: translateY(-2px);
}

.prorank-button-spacing {
  margin-left: 8px;
}

/* Link Analysis Section */
.prorank-link-analysis {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin-top: 25px;
}

.prorank-link-analysis h2 {
  margin: 0 0 25px 0;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prorank-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.prorank-analysis-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.prorank-analysis-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.prorank-analysis-number {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.prorank-analysis-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 1000px;
    opacity: 1;
  }
}

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

/* Loading States */
.prorank-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #64748b;
}

.prorank-loading .components-spinner {
  margin-right: 10px;
}

/* Empty States */
.prorank-empty-state {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.prorank-empty-state .dashicons {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .prorank-internal-linking-header {
    padding: 20px;
  }

  .prorank-internal-linking-header h1 {
    font-size: 24px;
  }

  .prorank-internal-linking-settings {
    padding: 20px;
  }

  .prorank-analysis-grid {
    grid-template-columns: 1fr;
  }

  .prorank-button-group {
    flex-direction: column;
  }

  .prorank-save-button,
  .prorank-reset-button {
    width: 100%;
    justify-content: center;
  }
}


/* Tier Badge */
.prorank-tier-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 12px;
  margin-left: 8px;
  animation: pulse 2s infinite;
}

.prorank-tier-notice {
  color: #f59e0b;
  font-size: 12px;
  font-style: italic;
  margin-top: 4px;
}

/* Print Styles */
@media print {
  .prorank-button-group,
  .prorank-advanced-settings {
    display: none;
  }

  .prorank-internal-linking-header {
    background: none;
    color: black;
    box-shadow: none;
  }
}