/* ===========================================================
   SUPER PROGRAMMATIC SEO - ADMIN STYLES (admin.css)
   =========================================================== */

/* Root Variables */
:root {
    --primary-color: #0073aa;
    --hover-color: #005f87;
    --text-color: #333;
    --border-color: #ccc;
    --font-size-base: 1rem;
  }
  
  /* ===========================================================
     General Styles
     =========================================================== */
  
  body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
  }
  
  h1, h2, h3 {
    margin-bottom: 1rem;
  }
  
  .section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
  }
  
  /* Inputs, Textareas, Selects */
  input[type="text"], input[type="url"], textarea, select {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #fafafa;
    font-size: var(--font-size-base);
  }
  
  input[type="text"]:focus, input[type="url"]:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
  
  textarea {
    height: 100px;
  }
  
  input[disabled], textarea[disabled] {
    background-color: #eee;
    cursor: not-allowed;
  }
  
  /* Buttons */
  button, .button-primary {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: var(--font-size-base);
    cursor: pointer;
  }
  
  button:hover, .button-primary:hover {
    background: var(--hover-color);
  }
  
  button:focus, .button-primary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
  
  .button-secondary {
    background: #f0f0f1;
    border-color: #dcdcde;
    color: #2c3338;
  }
  
  .button-secondary:hover {
    background: #e0e0e0;
    border-color: #c3c4c7;
  }
  
  /* Helper Text */
  .helper-text, .description {
    font-size: var(--font-size-base);
    color: #555;
    margin-top: 0.25rem;
  }
  
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  
  /* Warning text */
  .sp-seo-warning {
    display: none;
    color: red;
    font-size: 12px;
    margin-top: 5px;
  }
  
  /* ===========================================================
     Authors Page (sp-seo-authors)
     =========================================================== */
  
  .sp-seo-authors .wrap {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .sp-seo-authors .wp-list-table {
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .sp-seo-authors .wp-list-table th {
    font-weight: 600;
    background: #f8f9fa;
  }
  
  .sp-seo-authors .wp-list-table td {
    vertical-align: middle;
    padding: 15px 10px;
  }
  
  .sp-seo-authors .wp-list-table tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  .sp-seo-authors .wp-list-table tr:hover {
    background-color: #f1f5f9;
  }
  
  .sp-seo-authors select {
    width: 200px !important;
  }
  
  .sp-seo-authors .regular-text {
    width: 100%;
    max-width: 200px;
  }
  
  .sp-seo-authors .large-text {
    width: 100%;
    min-height: 80px;
    resize: vertical;
  }
  
  /* Responsive - Authors */
  @media (max-width: 1200px) {
    .sp-seo-authors .wrap {
      padding: 0 20px;
    }
  }
  
  @media (max-width: 782px) {
    .sp-seo-authors .wp-list-table thead {
      display: none;
    }
  
    .sp-seo-authors .wp-list-table tr {
      display: block;
      margin-bottom: 20px;
      border: 1px solid #ccd0d4;
      box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    }
  
    .sp-seo-authors .wp-list-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 15px;
      border-bottom: 1px solid #f0f0f1;
    }
  
    .sp-seo-authors .wp-list-table td:before {
      content: attr(data-label);
      font-weight: 600;
      margin-right: 15px;
      flex: 0 0 120px;
    }
  
    .sp-seo-authors select,
    .sp-seo-authors .regular-text,
    .sp-seo-authors .large-text {
      width: 100% !important;
      max-width: none;
      min-width: 0;
      flex-grow: 1;
    }
  
    .sp-seo-authors .button-group {
      display: flex;
      gap: 8px;
    }
  }
  
  /* Responsive Labels */
  @media (max-width: 782px) {
    .sp-seo-authors .wp-list-table td:nth-child(1):before { content: "Author Name"; }
    .sp-seo-authors .wp-list-table td:nth-child(2):before { content: "Writing Style"; }
    .sp-seo-authors .wp-list-table td:nth-child(3):before { content: "Biography"; }
    .sp-seo-authors .wp-list-table td:nth-child(4):before { content: "Personal Style"; }
    .sp-seo-authors .wp-list-table td:nth-child(5):before { content: "Actions"; }
  }
  
  /* ===========================================================
     Article Generator Block
     =========================================================== */
  
  .sp-seo-block {
    margin-bottom: 20px;
  }
  
  .sp-seo-cta {
    background-color: #f0f0f0;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
  }
  
  .sp-seo-cta-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
  }
  
  .sp-seo-cta-button:hover {
    background-color: #45a049;
  }
  
  /* Prompt Blocks */
  .prompt-block {
    background: #fafafa;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px dashed #bbb;
  }
  
  .custom-prompt-area {
    display: none;
    margin-top: 1rem;
  }
  
  .char-counter, #char-counter {
    font-size: var(--font-size-base);
    color: #555;
    text-align: right;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
  }
  
  /* Checkbox Styles */
  .checkbox-section {
    margin: 1rem 0;
  }
  
  .checkbox-section label {
    margin-right: 1rem;
  }
  
  input[type="checkbox"] {
    margin-right: 10px;
  }

section.content-setting-sec label {
    display: block;
    font-size: 14px;
    color: #000;
}
section.content-setting-sec select {
    border-radius: 0px;
    padding: 7px;
    border-color: #9f9f9f;
    color: #2c3338;
    outline: none !important;
    box-shadow: none !important;
    background-color: #f9f9f9;
    width: 100%;
    max-width: 100%;
}
section.content-setting-sec select:hover {
    color: #2c3338;
}
section.content-setting-sec input {
    border-radius: 0px;
    padding: 7px;
    border-color: #9f9f9f !important;
    margin-bottom: 0px;
}
section.content-setting-sec input:focus {
    outline: none !important;
    box-shadow: none;
}
section.content-setting-sec .helper-text {
    margin-bottom: 12px;
    font-size: 14px;
    color: #000;
}
section.content-setting-sec input#cta-link {
    margin-bottom: 2px;
}
section.content-setting-sec .char-counter {
    margin-top: 0px;
    margin-bottom: 0px;
}
section.section.content-setting-sec h2, form.sp-seo-generator-form h3 {
    font-size: 23px;
    line-height: 26px;
    margin-top: 0px;
    font-weight: 400;
}
 section.section.content-setting-sec table {
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        border: 1px solid #ccc;
        padding: 12px;
        text-align: left;
        vertical-align: top;
    }

    thead th {
        background-color: #f2f2f2;
    }

    caption {
        font-weight: bold;
        margin-bottom: 10px;
        font-size: 1.2em;
    }
section.section.content-setting-sec button[name="generate_article"] {
    margin-top: 20px;
    border-radius: 0px;
}
section.section.content-setting-sec table caption {
    font-weight: 400;
    background: #0073aa;
    color: #fff;
    padding: 10px;
    margin-bottom: 0px;
}
section.section.content-setting-sec table th {
    font-weight: 400;
    font-size: 17px;
    line-height: 23px;
}
section.section.content-setting-sec select#language {
    margin-bottom: 40px;
}
 .table-container {
        max-height: 500px; /* Adjust height as needed */
        overflow-y: auto;
        border: 1px solid #ccc;
    }
section.section.content-setting-sec table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.scrollable-table::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.scrollable-table::-webkit-scrollbar-track {
  background: #0073aa1f;
  border-radius: 0px;
}
.scrollable-table::-webkit-scrollbar-thumb {
  background-color: #0073aa;   border-radius: 6px;
  border: 2px solid #f1f1f1; 
}

/* Writing style page CSS Start */
.sp-seo-writing-styles .writing-style {
            background-color: #f7f7f7;
            padding: 20px;
            margin: 15px 0;
            border-radius: 5px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .sp-seo-writing-styles h2 {
            font-size: 1.5em;
            margin-bottom: 10px;
            color: #333;
        }

        .sp-seo-writing-styles .style-formal {
            border-left: 5px solid #0073aa;
        }

        .sp-seo-writing-styles .style-professional {
            border-left: 5px solid #00aaff;
        }

        .sp-seo-writing-styles .style-light-funny {
            border-left: 5px solid #f0ad4e;
        }

        .sp-seo-writing-styles .style-extra-funny {
            border-left: 5px solid #d9534f;
        }

        .sp-seo-writing-styles .style-ironic {
            border-left: 5px solid #5bc0de;
        }

        .sp-seo-writing-styles .style-hard-hitting {
            border-left: 5px solid #d9534f;
        }

        .sp-seo-writing-styles .style-contrasting {
            border-left: 5px solid #f0ad4e;
        }

        .sp-seo-writing-styles .style-conversational {
            border-left: 5px solid #5bc0de;
        }

        .sp-seo-writing-styles .style-persuasive {
            border-left: 5px solid #0073aa;
        }

        .sp-seo-writing-styles .style-descriptive {
            border-left: 5px solid #00aaff;
        }

/* Writing style page CSS END */

/* ===========================================================
   Save Button Visibility Fix
   Ensures all plugin Save/Submit buttons are always visible
   and accessible – fixes blanket hide that broke all pages.
   =========================================================== */

/* Show all submit inputs inside .submit containers */
p.submit input[type="submit"],
p.submit input[type="button"],
.submit input[type="submit"],
.submit input[type="button"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Sticky save bar: stays visible while scrolling long forms */
.wrap form p.submit,
.wrap form .submit {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0;
    border-top: 1px solid #ddd;
    z-index: 9999 !important;
    margin-bottom: 0;
    clear: both;
}

/* Prevent sticky bar from overlapping last form field */
.wrap form {
    padding-bottom: 10px;
}

/* ===========================================================
   Image Settings page: maximum-specificity save button override
   Beats any theme or third-party plugin rule that hides buttons
   =========================================================== */

.sps-image-settings #sps-image-save-container,
body.wp-admin .sps-image-settings p.submit {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 99999 !important;
}

.sps-image-settings #sps-force-save-button,
body.wp-admin .sps-image-settings p.submit input[type="submit"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 99999 !important;
}
figure.wp-block-image.size-large img {
    width: 800px;
    height: 472px;
}

/* ===========================================================
   Configuration Status Widget Styles
   =========================================================== */

.super-programmatic-seo-config-widget {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.super-programmatic-seo-config-widget.complete {
    border-left: 4px solid #46b450;
    background: #f7fff7;
}

.super-programmatic-seo-config-widget.incomplete {
    border-left: 4px solid #ffb900;
    background: #fff8e5;
}

.super-programmatic-seo-config-widget h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.super-programmatic-seo-config-widget.complete h3 {
    color: #46b450;
}

.super-programmatic-seo-config-widget.incomplete h3 {
    color: #d63638;
}

.super-programmatic-seo-config-checklist {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.super-programmatic-seo-config-checklist li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.super-programmatic-seo-config-checklist li:last-child {
    border-bottom: none;
}

.super-programmatic-seo-config-checklist li.complete {
    color: #46b450;
}

.super-programmatic-seo-config-checklist li.missing {
    color: #d63638;
}

.super-programmatic-seo-config-checklist li a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.super-programmatic-seo-config-checklist li a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Configuration Warning in Article Generator */
.sp-seo-config-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.sp-seo-config-warning h3 {
    color: #856404;
    margin: 0 0 10px 0;
}

.sp-seo-config-warning p {
    color: #856404;
    margin: 0 0 15px 0;
}

/* Disabled form styling */
form[data-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
}

form[data-disabled="true"] button[disabled] {
    background: #ccc;
    cursor: not-allowed;
}

/* Dashboard grid layout */
.super-programmatic-seo-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.super-programmatic-seo-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* FREE VERSION STYLES */
.super-programmatic-seo-usage-counter {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.super-programmatic-seo-usage-counter h3 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.usage-progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #00a0d2 100%);
    transition: width 0.3s ease;
}

.usage-limit-reached {
    color: #d63638;
    font-weight: bold;
    margin-top: 10px;
}

.super-programmatic-seo-easy-article-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 30px;
    margin: 20px 0;
}

.super-programmatic-seo-easy-article-form h2 {
    margin-top: 0;
    color: #0073aa;
}

.super-programmatic-seo-upgrade-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.super-programmatic-seo-upgrade-banner h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.super-programmatic-seo-upgrade-banner ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.super-programmatic-seo-upgrade-banner li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.super-programmatic-seo-upgrade-banner li:last-child {
    border-bottom: none;
}

.super-programmatic-seo-upgrade-banner .button {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.super-programmatic-seo-upgrade-banner .button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.upgrade-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.upgrade-card h2 {
    color: white;
    margin-top: 0;
}

.upgrade-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.upgrade-card li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.upgrade-card li:last-child {
    border-bottom: none;
}

.upgrade-card .button {
    background: #fff;
    color: #667eea;
    border: none;
}

.upgrade-card .button:hover {
    background: #f0f0f0;
}

/* Required field indicator */
.required {
    color: #d63638;
    font-weight: bold;
}

/* Form improvements */
.super-programmatic-seo-easy-article-form .form-table th {
    width: 200px;
}

.super-programmatic-seo-easy-article-form .regular-text {
    width: 100%;
    max-width: 500px;
}

.super-programmatic-seo-easy-article-form .large-text {
    width: 100%;
    max-width: 600px;
}