/* Bytnexo SEO Manager - Admin Styles */

/* ============================================
   SETTINGS PAGE STYLES
============================================ */

.bytnexo-settings-wrap {
  max-width: 1200px;
  margin: 20px auto;
}

.bytnexo-settings-title {
  color: #1d2327;
  font-size: 28px;
  margin-bottom: 10px;
  padding-bottom: 15px;
}

.bytnexo-settings-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #c3c4c7;
  border-radius: 8px;
  padding: 25px;
  margin: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bytnexo-header-content h2 {
  margin: 0 0 10px 0;
  color: #1d2327;
  font-size: 22px;
}

.bytnexo-header-content p {
  margin: 0;
  color: #646970;
  font-size: 15px;
  max-width: 600px;
}

.bytnexo-review-btn {
  font-weight: 600;
  padding: 10px 20px;
  font-size: 14px;
}

.bytnexo-review-btn .dashicons {
  margin-right: 5px;
  vertical-align: middle;
}

.bytnexo-settings-container {
  display: flex;
  gap: 30px;
  margin: 30px 0;
}

.bytnexo-settings-main {
  flex: 3;
}

.bytnexo-settings-sidebar {
  flex: 1;
  min-width: 300px;
}

/* Form Sections */
.bytnexo-section-description {
  background: #f0f6fc;
  border-left: 4px solid #72aee6;
  padding: 12px 15px;
  margin: 20px 0 25px 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================
   IMAGE UPLOADER STYLES - BLANK STATE
============================================ */

.bytnexo-image-uploader {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 20px;
  margin: 15px 0;
}

.bytnexo-image-preview-box {
  position: relative;
  margin-bottom: 20px;
  border: 2px dashed #dcdcde;
  border-radius: 8px;
  background: #f8f9fa;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.bytnexo-image-preview-box:hover {
  border-color: #2271b1;
  background: #f0f6fc;
}

.bytnexo-image-preview-box img {
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

.bytnexo-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bytnexo-image-overlay .dashicons {
  color: #fff;
  font-size: 32px;
  width: 32px;
  height: 32px;
}

.bytnexo-image-preview-box:hover .bytnexo-image-overlay {
  opacity: 1;
}

/* Empty State Styles */
.bytnexo-empty-image-state {
  text-align: center;
  padding: 40px 20px;
}

.bytnexo-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: #e8eaed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bytnexo-empty-icon .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: #8c8f94;
}

.bytnexo-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
  margin: 0 0 10px 0;
}

.bytnexo-empty-description {
  font-size: 14px;
  color: #646970;
  line-height: 1.5;
  margin: 0;
  max-width: 300px;
}

/* Button Styles */
.bytnexo-image-upload-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bytnexo-image-upload-actions .button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bytnexo-image-upload-actions .button-primary {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.bytnexo-image-upload-actions .button-primary:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
}

.bytnexo-image-upload-actions .button {
  background: #f6f7f7;
  border-color: #dcdcde;
  color: #50575e;
}

.bytnexo-image-upload-actions .button:hover {
  background: #f0f0f1;
  border-color: #8c8f94;
  color: #1d2327;
}

.bytnexo-image-upload-actions .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Image Requirements */
.bytnexo-image-requirements {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.bytnexo-image-requirements h4 {
  margin: 0 0 15px 0;
  color: #1d2327;
  font-size: 16px;
  font-weight: 600;
}

.bytnexo-image-requirements ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bytnexo-image-requirements li {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #3c434a;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bytnexo-image-requirements li:last-child {
  margin-bottom: 0;
}

.bytnexo-image-requirements .dashicons {
  margin-top: 3px;
  flex-shrink: 0;
}

.bytnexo-note {
  background: #fff8e5;
  border-left: 3px solid #ffb900;
  padding: 10px 15px;
  margin: 15px 0;
  font-size: 13px;
  line-height: 1.5;
}

.bytnexo-note strong {
  color: #dba617;
}

/* Checkbox Grid */
.bytnexo-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.bytnexo-checkbox-item {
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bytnexo-checkbox-item:hover {
  background: #f0f0f1;
  border-color: #8c8f94;
}

.bytnexo-checkbox-item input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
}

/* ============================================
   POST TYPE WARNING STYLES
============================================ */

.bytnexo-posttype-warning {
  background: #fff8e5;
  border: 1px solid #ffb900;
  border-left: 4px solid #ffb900;
  border-radius: 4px;
  padding: 12px 15px;
  margin: 15px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #3c434a;
}

.bytnexo-posttype-warning .dashicons {
  color: #dba617;
  margin-right: 8px;
  vertical-align: middle;
  font-size: 18px;
}

.bytnexo-posttype-warning strong {
  color: #dba617;
  margin-right: 5px;
}

.bytnexo-posttype-warning:hover {
  background: #fff4d5;
  border-color: #e5a800;
}

/* Settings error notice styling */
.notice-error {
  border-left-color: #d63638 !important;
}

.notice-error .bytnexo-posttypes-error {
  font-weight: 600;
  color: #d63638;
}

/* Field Guides */
.bytnexo-field-guide {
  background: #f0f6fc;
  border: 1px solid #c5d9ed;
  border-radius: 4px;
  padding: 15px;
  margin-top: 15px;
}

.bytnexo-field-guide h4 {
  margin: 0 0 10px 0;
  color: #1d2327;
  font-size: 14px;
}

.bytnexo-field-guide ol {
  margin: 10px 0;
  padding-left: 20px;
}

.bytnexo-field-guide li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.bytnexo-field-benefit {
  background: #edfaef;
  border: 1px solid #b8e6bf;
  border-radius: 4px;
  padding: 10px 15px;
  margin: 15px 0 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.bytnexo-field-benefit .dashicons {
  margin-right: 5px;
  vertical-align: middle;
}

/* Sidebar Boxes */
.bytnexo-sidebar-box {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.bytnexo-sidebar-box h3 {
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
  margin: 0;
  padding: 15px;
  font-size: 16px;
  color: #1d2327;
}

.bytnexo-sidebar-box h3 .dashicons {
  margin-right: 8px;
  vertical-align: middle;
  color: #2271b1;
}

.bytnexo-sidebar-box > div {
  padding: 15px;
}

.bytnexo-info-box ul {
  margin: 10px 0;
  padding-left: 20px;
}

.bytnexo-info-box li {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.bytnexo-support-box p {
  margin: 10px;
  font-size: 14px;
}

.bytnexo-support-box .button {
  width: 100%;
  text-align: center;
  padding: 10px;
}

.bytnexo-stats-box p {
  margin: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.bytnexo-stats-box strong {
  color: #1d2327;
  min-width: 100px;
  display: inline-block;
}

/* Footer */
.bytnexo-settings-footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #dcdcde;
  margin-top: 30px;
  color: #646970;
  font-size: 14px;
}

.bytnexo-footer-note {
  background: #f0f6fc;
  border-left: 4px solid #72aee6;
  padding: 10px 15px;
  margin: 15px auto;
  max-width: 600px;
  font-size: 13px;
}

.bytnexo-footer-note .dashicons {
  color: #72aee6;
  margin-right: 5px;
  vertical-align: middle;
}

/* ============================================
   META BOX STYLES
============================================ */

/* Tab Navigation */
.bytnexo-tab-nav {
  display: flex;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  margin: 0;
  flex-wrap: wrap;
}

.bytnexo-tab-nav button {
  padding: 12px 20px;
  background: none;
  border: none;
  border-right: 1px solid #dcdcde;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #50575e;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  margin: 0;
}

.bytnexo-tab-nav button:last-child {
  border-right: none;
}

.bytnexo-tab-nav button:hover {
  background: #f0f0f1;
  color: #2271b1;
}

.bytnexo-tab-nav button.active {
  background: #fff;
  color: #2271b1;
  border-bottom: 3px solid #2271b1;
  font-weight: 600;
}

.bytnexo-tab-nav button .dashicons {
  margin-right: 8px;
  margin-top: 3px;
  font-size: 16px;
}

/* Tab Content */
.bytnexo-tab-content {
  display: none;
  background: #fff;
  border: 1px solid #dcdcde;
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 20px;
}

.bytnexo-tab-content.active {
  display: block;
}

/* Field Groups */
.bytnexo-field-group {
  max-width: 800px;
}

.bytnexo-field {
  margin-bottom: 25px;
}

.bytnexo-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #1d2327;
}

.bytnexo-field .bytnexo-required {
  color: #d63638;
  margin-left: 3px;
}

.bytnexo-field .bytnexo-optional {
  color: #646970;
  margin-left: 5px;
  font-weight: normal;
}

.bytnexo-field input[type="text"],
.bytnexo-field input[type="url"],
.bytnexo-field textarea,
.bytnexo-field select {
  width: 100%;
  max-width: 600px;
  padding: 8px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.bytnexo-field input[type="text"]:focus,
.bytnexo-field input[type="url"]:focus,
.bytnexo-field textarea:focus,
.bytnexo-field select:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

.bytnexo-field textarea {
  min-height: 100px;
  resize: vertical;
}

.bytnexo-counter {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  color: #646970;
}

.bytnexo-char-count {
  font-weight: 600;
}

.bytnexo-counter.warning .bytnexo-char-count {
  color: #dba617;
}

.bytnexo-counter.error .bytnexo-char-count {
  color: #d63638;
}

.bytnexo-field-note {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #646970;
  line-height: 1.5;
}

/* Image Preview in Meta Box */
.bytnexo-image-preview {
  margin-top: 15px;
}

.bytnexo-image-preview img {
  max-width: 300px;
  height: auto;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 3px;
  background: #fff;
}

.bytnexo-image-status {
  margin: 8px 0 0 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bytnexo-image-status .dashicons {
  font-size: 16px;
}

/* Preview Tab */
.bytnexo-preview-container {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.bytnexo-preview-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #1d2327;
}

.bytnexo-preview-section h4 .dashicons {
  color: #2271b1;
}

.bytnexo-google-preview {
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.bytnexo-preview-title {
  color: #1a0dab;
  font-size: 18px;
  margin-bottom: 5px;
  line-height: 1.3;
}

.bytnexo-preview-url {
  color: #006621;
  font-size: 14px;
  margin-bottom: 10px;
}

.bytnexo-preview-desc {
  color: #545454;
  font-size: 14px;
  line-height: 1.58;
}

.bytnexo-facebook-preview {
  border: 1px solid #dadde1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 500px;
}

.bytnexo-preview-image img {
  width: 100%;
  height: auto;
  display: block;
}

.bytnexo-preview-content {
  padding: 12px;
  background: #f0f2f5;
}

.bytnexo-preview-site {
  font-size: 12px;
  color: #606770;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bytnexo-preview-ogtitle {
  font-size: 16px;
  color: #1d2129;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.3;
}

.bytnexo-preview-ogdesc {
  font-size: 14px;
  color: #606770;
  line-height: 1.38;
}

.bytnexo-preview-note {
  margin: 10px 0 0 0;
  font-size: 13px;
  color: #646970;
  font-style: italic;
}

/* ============================================
   QUICK EDIT STYLES
============================================ */

.bytnexo-quick-edit-header {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dcdcde;
}

.bytnexo-quick-edit-header h4 {
  margin: 0;
  color: #1d2327;
  font-size: 16px;
}

.bytnexo-quick-edit-header .description {
  margin: 5px 0 0 0;
  color: #646970;
}

.bytnexo-quick-edit-note {
  margin: 15px 0 0 0;
  font-size: 12px;
  color: #646970;
  line-height: 1.5;
}

.bytnexo-quick-edit-note .dashicons {
  margin-right: 3px;
  vertical-align: middle;
}

/* ============================================
   RESPONSIVE STYLES
============================================ */

@media screen and (max-width: 1024px) {
  .bytnexo-settings-container {
    flex-direction: column;
  }

  .bytnexo-settings-sidebar {
    min-width: 100%;
  }
}

@media screen and (max-width: 782px) {
  .bytnexo-settings-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .bytnexo-header-content p {
    max-width: 100%;
  }

  .bytnexo-tab-nav {
    flex-direction: column;
  }

  .bytnexo-tab-nav button {
    border-right: none;
    border-bottom: 1px solid #dcdcde;
    justify-content: center;
    text-align: center;
    padding: 15px;
  }

  .bytnexo-tab-nav button.active {
    border-bottom: 3px solid #2271b1;
  }

  .bytnexo-field input[type="text"],
  .bytnexo-field input[type="url"],
  .bytnexo-field textarea,
  .bytnexo-field select {
    max-width: 100%;
  }

  .bytnexo-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .bytnexo-preview-container {
    grid-template-columns: 1fr;
  }

  .bytnexo-image-preview-box {
    min-height: 150px;
  }

  .bytnexo-empty-icon {
    width: 60px;
    height: 60px;
  }

  .bytnexo-empty-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
  }

  .bytnexo-empty-title {
    font-size: 16px;
  }

  .bytnexo-image-upload-actions {
    flex-direction: column;
  }

  .bytnexo-image-upload-actions .button {
    width: 100%;
    justify-content: center;
  }
}

@media screen and (max-width: 600px) {
  .bytnexo-settings-title {
    font-size: 24px;
    text-align: center;
  }
}

/* ============================================
   ADMIN COLUMN STYLES
============================================ */

.column-bytnexo_seo {
  width: 100px;
  text-align: center;
}

.column-bytnexo_seo .dashicons {
  font-size: 18px;
  vertical-align: middle;
}

/* Admin column responsive label */
.bytnexo-column-label {
  margin-left: 5px;
}

@media screen and (max-width: 782px) {
  .bytnexo-column-label {
    display: none;
  }

  .column-bytnexo_seo {
    width: 40px;
  }
}

/* Ensure Screen Options shows the label */
#adv-settings .metabox-prefs label[for="bytnexo_seo-hide"] {
  display: inline-block;
  margin-left: 5px;
}
