/**
 * ProRank Design System - Site Basics Feature Styles
 *
 * Styles specific to the Site Basics settings module.
 * Extends core components for site configuration layouts.
 *
 * @module features/site-basics
 * @since 3.0.0
 */

/* ============================================
   SITE BASICS CONTAINER
   Main wrapper for site basics settings
   ============================================ */

.prorank-site-basics-settings {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   IMAGE UPLOAD COMPONENTS
   Styles for logo and image upload areas
   ============================================ */

.prorank-site-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--prorank-space-lg);
  margin-top: var(--prorank-space-md);
}

.prorank-image-upload-box {
  background: var(--prorank-bg);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  overflow: hidden;
  transition: var(--prorank-transition);
}

.prorank-image-upload-box:hover {
  box-shadow: var(--prorank-shadow-sm);
  border-color: var(--prorank-border-dark);
}

.prorank-image-upload-header {
  display: flex;
  align-items: flex-start;
  gap: var(--prorank-space-md);
  padding: var(--prorank-space-lg);
  background: var(--prorank-bg-secondary);
  border-bottom: 1px solid var(--prorank-border);
}

.prorank-image-upload-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--prorank-bg);
  border-radius: var(--prorank-radius-sm);
  box-shadow: var(--prorank-shadow-xs);
}

.prorank-image-upload-icon svg {
  width: 24px;
  height: 24px;
}

.prorank-image-upload-info {
  flex: 1;
  min-width: 0;
}

.prorank-image-upload-info h4 {
  margin: 0 0 var(--prorank-space-xs);
  font-size: 16px;
  font-weight: 600;
  color: var(--prorank-text);
}

.prorank-image-upload-info p {
  margin: 0 0 var(--prorank-space-xs);
  font-size: 14px;
  color: var(--prorank-text-secondary);
  line-height: 1.5;
}

.prorank-image-upload-specs {
  display: inline-block;
  font-size: 12px;
  color: var(--prorank-text-muted);
  padding: 2px 6px;
  background: var(--prorank-bg-tertiary);
  border-radius: var(--prorank-radius-xs);
  margin-top: var(--prorank-space-xs);
}

.prorank-image-upload-area {
  padding: var(--prorank-space-lg);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prorank-image-upload-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--prorank-space-sm);
  width: 100%;
  padding: var(--prorank-space-xl);
  background: var(--prorank-bg-secondary);
  border: 2px dashed var(--prorank-border);
  border-radius: var(--prorank-radius);
  cursor: pointer;
  transition: var(--prorank-transition);
}

.prorank-image-upload-trigger:hover {
  background: var(--prorank-bg-tertiary);
  border-color: var(--prorank-primary);
  transform: translateY(-2px);
}

.prorank-image-upload-trigger:active {
  transform: translateY(0);
}

.prorank-upload-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--prorank-text);
}

.prorank-upload-hint {
  font-size: 12px;
  color: var(--prorank-text-muted);
}

/* Image Preview Styles */
.prorank-image-preview-modern {
  width: 100%;
}

.prorank-image-preview-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--prorank-radius-sm);
  overflow: hidden;
  background: var(--prorank-bg-tertiary);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prorank-image-preview-wrapper.og-preview {
  aspect-ratio: 16 / 9;
}

.prorank-image-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.prorank-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  gap: var(--prorank-space-sm);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.prorank-image-preview-wrapper:hover .prorank-image-overlay {
  opacity: 1;
}

.prorank-image-filename {
  margin-top: var(--prorank-space-sm);
  font-size: 12px;
  color: var(--prorank-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   PREVIEW BOX
   Title separator preview component
   ============================================ */

.prorank-preview-box {
  padding: var(--prorank-space-lg);
  background: var(--prorank-bg-secondary);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
  margin-top: var(--prorank-space-md);
}

/* ============================================
   VERIFICATION SERVICES
   Webmaster tools verification styling
   ============================================ */

.prorank-verification-service {
  padding: var(--prorank-space-md);
  background: var(--prorank-bg);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
  transition: var(--prorank-transition);
}

.prorank-verification-service:hover {
  box-shadow: var(--prorank-shadow-xs);
  border-color: var(--prorank-border-dark);
}

.prorank-verification-status {
  display: inline-flex;
  align-items: center;
  gap: var(--prorank-space-xs);
  padding: 4px 8px;
  background: rgba(0, 163, 42, 0.1);
  border-radius: var(--prorank-radius-xs);
  margin-top: var(--prorank-space-sm);
}

/* ============================================
   SOCIAL PROFILES
   Social media profile management
   ============================================ */

.prorank-social-profiles-grid {
  display: grid;
  gap: var(--prorank-space-md);
}

.prorank-additional-profiles {
  margin-top: var(--prorank-space-lg);
  padding: var(--prorank-space-lg);
  background: var(--prorank-bg-secondary);
  border-radius: var(--prorank-radius);
}

.prorank-additional-profiles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--prorank-space-md);
}

.prorank-additional-profiles-list {
  display: flex;
  flex-direction: column;
  gap: var(--prorank-space-sm);
}

.prorank-additional-profile-item {
  display: flex;
  align-items: center;
  gap: var(--prorank-space-sm);
  padding: var(--prorank-space-sm) var(--prorank-space-md);
  background: var(--prorank-bg);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
}

.prorank-additional-profile-item:hover {
  box-shadow: var(--prorank-shadow-xs);
}

.prorank-profile-platform {
  font-weight: 600;
  color: var(--prorank-text);
  min-width: 100px;
}

.prorank-profile-url {
  flex: 1;
  color: var(--prorank-text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prorank-profile-remove {
  padding: 4px;
  background: transparent;
  border: none;
  color: var(--prorank-danger);
  cursor: pointer;
  border-radius: var(--prorank-radius-xs);
  transition: var(--prorank-transition);
}

.prorank-profile-remove:hover {
  background: rgba(220, 38, 38, 0.1);
}

.prorank-add-profile-form {
  display: flex;
  gap: var(--prorank-space-sm);
  margin-top: var(--prorank-space-md);
}

.prorank-add-profile-form input {
  flex: 1;
}

/* ============================================
   ORGANIZATION INFO
   Organization/person schema settings
   ============================================ */

.prorank-org-type-selector {
  display: flex;
  gap: var(--prorank-space-md);
  margin-bottom: var(--prorank-space-lg);
}

.prorank-org-type-option {
  flex: 1;
  padding: var(--prorank-space-lg);
  background: var(--prorank-bg);
  border: 2px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  cursor: pointer;
  transition: var(--prorank-transition);
  text-align: center;
}

.prorank-org-type-option:hover {
  border-color: var(--prorank-primary-light);
  box-shadow: var(--prorank-shadow-sm);
}

.prorank-org-type-option.selected {
  background: var(--prorank-primary-bg);
  border-color: var(--prorank-primary);
}

.prorank-org-type-icon {
  font-size: 32px;
  margin-bottom: var(--prorank-space-sm);
  color: var(--prorank-text-secondary);
}

.prorank-org-type-option.selected .prorank-org-type-icon {
  color: var(--prorank-primary);
}

.prorank-org-type-label {
  font-weight: 600;
  color: var(--prorank-text);
}

.prorank-org-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--prorank-space-md);
}

/* ============================================
   CARD HEADER ACTIONS
   Buttons in card headers
   ============================================ */

.prorank-card-header-actions {
  display: flex;
  gap: var(--prorank-space-sm);
  margin-left: auto;
}

.prorank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   SITE POLICIES
   E-E-A-T policy pages configuration
   ============================================ */

.prorank-policies-grid {
  display: grid;
  gap: var(--prorank-space-lg);
}

.prorank-policy-item {
  display: flex;
  align-items: center;
  gap: var(--prorank-space-md);
  padding: var(--prorank-space-md);
  background: var(--prorank-bg);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
  transition: var(--prorank-transition);
}

.prorank-policy-item:hover {
  box-shadow: var(--prorank-shadow-xs);
  border-color: var(--prorank-border-dark);
}

.prorank-policy-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--prorank-bg-tertiary);
  border-radius: var(--prorank-radius-sm);
  color: var(--prorank-text-secondary);
}

.prorank-policy-content {
  flex: 1;
  min-width: 0;
}

.prorank-policy-title {
  font-weight: 600;
  color: var(--prorank-text);
  margin-bottom: var(--prorank-space-xs);
}

.prorank-policy-description {
  font-size: 13px;
  color: var(--prorank-text-secondary);
  line-height: 1.5;
}

.prorank-policy-selector {
  min-width: 200px;
}

/* ============================================
   INFO SECTIONS
   Help and informational content
   ============================================ */

.prorank-info-section {
  padding: var(--prorank-space-lg);
  background: var(--prorank-bg-secondary);
  border-left: 3px solid var(--prorank-primary);
  border-radius: var(--prorank-radius-sm);
  margin-bottom: var(--prorank-space-md);
}

.prorank-info-section ol,
.prorank-info-section ul {
  margin-top: var(--prorank-space-sm);
  padding-left: var(--prorank-space-lg);
}

.prorank-info-section li {
  margin-bottom: var(--prorank-space-xs);
  line-height: 1.6;
}

/* ============================================
   BUTTON GROUP OVERRIDES
   Ensure consistent button styling
   ============================================ */

.prorank-site-basics-settings .prorank-btn-group {
  display: flex;
  gap: var(--prorank-space-sm);
  justify-content: flex-end;
}

/* ============================================
   RESPONSIVE DESIGN
   Mobile and tablet optimizations
   ============================================ */

@media (max-width: 1024px) {
  .prorank-site-images-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .prorank-image-upload-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .prorank-org-type-selector {
    flex-direction: column;
  }

  .prorank-additional-profile-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .prorank-profile-platform {
    min-width: auto;
  }

  .prorank-add-profile-form {
    flex-direction: column;
  }

  .prorank-policy-item {
    flex-direction: column;
    text-align: center;
  }

  .prorank-policy-selector {
    width: 100%;
  }

  .prorank-site-basics-settings .prorank-btn-group {
    flex-direction: column-reverse;
  }

  .prorank-site-basics-settings .prorank-btn-group button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .prorank-image-upload-area {
    padding: var(--prorank-space-md);
  }

  .prorank-image-upload-trigger {
    padding: var(--prorank-space-lg);
  }

  .prorank-preview-box {
    padding: var(--prorank-space-md);
    font-size: 14px;
  }
}

/* ============================================
   ANIMATION STATES
   Loading and transition animations
   ============================================ */

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

.prorank-site-basics-settings .prorank-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  animation: fadeIn 0.3s ease;
}

/* ============================================
   VALIDATION STATES
   Form field validation feedback
   ============================================ */

.prorank-field-valid {
  border-color: var(--prorank-success) !important;
}

.prorank-field-invalid {
  border-color: var(--prorank-danger) !important;
}

.prorank-validation-message {
  display: flex;
  align-items: center;
  gap: var(--prorank-space-xs);
  margin-top: var(--prorank-space-xs);
  font-size: 12px;
  animation: fadeIn 0.2s ease;
}

.prorank-validation-message.success {
  color: var(--prorank-success);
}

.prorank-validation-message.error {
  color: var(--prorank-danger);
}

/* ============================================
   HOVER EFFECTS
   Interactive element hover states
   ============================================ */

.prorank-site-basics-settings input:focus,
.prorank-site-basics-settings textarea:focus,
.prorank-site-basics-settings select:focus {
  outline: none;
  border-color: var(--prorank-primary);
  box-shadow: 0 0 0 1px var(--prorank-primary-light);
}

.prorank-site-basics-settings button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-site-basics-settings button:disabled:hover {
  transform: none;
  box-shadow: none;
}