/**
 * Social Tab Styles - Modern Design
 * Colors: Blue #3b82f6, Orange #ff6b35
 */

/* ========================================
   SOCIAL TAB CONTENT
   ======================================== */

.prorank-social-tab-content {
  padding: 0;
}

.prorank-social-section {
  margin-bottom: 32px;
}

.prorank-social-section:last-child {
  margin-bottom: 0;
}

.prorank-social-section h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e1e1e;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BLUE accent for Facebook section */
.prorank-social-section:first-child h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: #0073aa;
  border-radius: 2px;
}

/* Different color for Twitter section - use text instead */
.prorank-social-section h3 .section-icon {
  color: #555;
}

.prorank-social-section > .description {
  margin: 0 0 20px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

/* Section Divider */
.prorank-section-divider {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid #dcdcde;
}

/* ========================================
   FIELD GROUPS
   ======================================== */

.prorank-social-tab-content .prorank-field-group {
  margin-bottom: 20px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.prorank-social-tab-content .prorank-field-group:hover {
  border-color: #c3c4c7;
}

.prorank-social-tab-content .prorank-field-group h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e1e1e;
}

.prorank-social-tab-content .components-base-control__label {
  color: #1f2937 !important;
  opacity: 1 !important;
  font-size: 12px;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.prorank-social-tab-content .components-base-control__label * {
  color: #1f2937 !important;
  opacity: 1 !important;
}

.prorank-social-tab-content .components-input-control__input,
.prorank-social-tab-content .components-text-control__input,
.prorank-social-tab-content .components-textarea-control__input {
  background: #fff !important;
  color: #0f172a !important;
  border-color: #cbd5e1;
}

.prorank-social-tab-content .components-input-control__input:-webkit-autofill,
.prorank-social-tab-content .components-text-control__input:-webkit-autofill,
.prorank-social-tab-content .components-textarea-control__input:-webkit-autofill {
  -webkit-text-fill-color: #0f172a !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}

/* ========================================
   MEDIA UPLOAD
   ======================================== */

.prorank-media-upload {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prorank-media-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.prorank-media-preview img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ========================================
   SOCIAL PREVIEW - PREMIUM CARDS
   ======================================== */

.prorank-social-preview {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.prorank-social-preview__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 12px 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prorank-social-preview__badge--facebook {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.prorank-social-preview__badge--twitter {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.prorank-social-preview__container {
  display: flex;
  background: #fff;
}

/* ========================================
   FACEBOOK PREVIEW
   ======================================== */

.prorank-social-preview--facebook {
  position: relative;
}

/* BLUE accent bar for Facebook */
.prorank-social-preview--facebook::before {
  content: '';
  display: block;
  height: 3px;
  background: #1877f2;
}

/* Label badge */
.prorank-social-preview--facebook::after {
  content: none;
}

.prorank-social-preview--facebook .prorank-social-preview__container {
  flex-direction: column;
}

.prorank-social-preview--facebook .prorank-social-preview__image {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prorank-social-preview--facebook .prorank-social-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder when no image */
.prorank-social-preview--facebook .prorank-social-preview__image:empty::after {
  content: 'No image selected';
  color: #757575;
  font-size: 13px;
}

.prorank-social-preview--facebook .prorank-social-preview__content {
  padding: 16px;
  border-top: 1px solid #dcdcde;
}

.prorank-social-preview--facebook .prorank-social-preview__domain {
  font-size: 12px;
  color: #65676b;
  margin-bottom: 4px;
  word-break: break-word;
}

.prorank-social-preview--facebook .prorank-social-preview__title {
  font-size: 16px;
  font-weight: 600;
  color: #050505;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prorank-social-preview--facebook .prorank-social-preview__description {
  font-size: 14px;
  color: #65676b;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   TWITTER/X PREVIEW
   ======================================== */

.prorank-social-preview--twitter {
  position: relative;
}

/* Black accent bar for X/Twitter */
.prorank-social-preview--twitter::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

/* Label badge */
.prorank-social-preview--twitter::after {
  content: none;
}

.prorank-social-preview--twitter .prorank-social-preview__container {
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

/* Twitter Summary Card (small image) */
.prorank-social-preview--twitter-summary .prorank-social-preview__container {
  flex-direction: row;
}

.prorank-social-preview--twitter-summary .prorank-social-preview__image {
  width: 130px;
  min-height: 130px;
  flex-shrink: 0;
  background: #f7f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prorank-social-preview--twitter-summary .prorank-social-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prorank-social-preview--twitter-summary .prorank-social-preview__content {
  flex: 1;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #dcdcde;
}

/* Twitter Large Image Card */
.prorank-social-preview--twitter-summary_large_image .prorank-social-preview__container {
  flex-direction: column;
}

.prorank-social-preview--twitter-summary_large_image .prorank-social-preview__image {
  width: 100%;
  height: 250px;
  background: #f7f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prorank-social-preview--twitter-summary_large_image .prorank-social-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prorank-social-preview--twitter-summary_large_image .prorank-social-preview__content {
  padding: 14px 16px 12px;
  border-top: 1px solid #dcdcde;
}

/* Twitter Content */
.prorank-social-preview--twitter .prorank-social-preview__title {
  font-size: 15px;
  font-weight: 400;
  color: #0f1419;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prorank-social-preview--twitter .prorank-social-preview__description {
  font-size: 15px;
  color: #536471;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prorank-social-preview--twitter .prorank-social-preview__domain {
  font-size: 15px;
  color: #536471;
  word-break: break-word;
}

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

.prorank-social-tab-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px;
  color: #555;
}

/* ========================================
   SAVE STATUS
   ======================================== */

.prorank-social-tab-content .prorank-save-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.prorank-save-status--saving {
  background: #eff6ff;
  color: #0073aa;
  border: 1px solid #bfdbfe;
}

.prorank-save-status--error {
  background: #fef2f2;
  color: #d63638;
  border: 1px solid #fecaca;
}

.prorank-save-status .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* ========================================
   HELPER TEXT
   ======================================== */

.prorank-social-tab-content .description {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .prorank-social-preview--twitter .prorank-social-preview__title {
    padding-right: 0;
  }
}
