/**
 * Admin Styles
 */

.sstack-settings-container {
    max-width: 100%;
}

.sstack-stats-box ul li strong {
    display: inline-block;
    min-width: 120px;
}

.sstack-usage-box {
    font-size: 13px;
}

.sstack-usage-box code {
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* ============================================================
   Pro Feature Gate Styles
   ============================================================ */

/* Badge inline in headings / select options */
.sstack-pro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6B4FA0, #9B79D0);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 20px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Locked settings section */
.sstack-pro-locked-section {
    background: #fafafa;
    border: 1px dashed #c3aee8;
    border-radius: 6px;
    opacity: 0.85;
}

.sstack-pro-locked-section h3 {
    color: #7c6898 !important;
}

.sstack-pro-locked-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0 4px;
}

.sstack-lock-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.6;
}

.sstack-pro-locked-reason {
    margin: 0 0 8px;
    color: #5a5a5a;
    font-style: italic;
}

.sstack-pro-upgrade-link {
    display: inline-block;
    background: #6B4FA0;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.2s;
}

.sstack-pro-upgrade-link:hover {
    background: #5a3f8f;
}

/* Disabled select styling */
select[disabled],
select option[disabled] {
    color: #aaa;
}

/* Full Pro upgrade page (Author tab) */
.sstack-pro-upgrade-page {
    max-width: 760px;
}

.sstack-pro-upgrade-hero {
    text-align: center;
    background: linear-gradient(135deg, #f3eeff 0%, #ede4ff 100%);
    border: 1px solid #d0baff;
    border-radius: 10px;
    padding: 36px 40px;
    margin-bottom: 28px;
}

.sstack-pro-upgrade-icon {
    display: block;
    font-size: 56px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.sstack-pro-upgrade-hero h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #2c1f4a;
}

.sstack-pro-upgrade-tagline {
    font-size: 15px;
    color: #5a4a7a;
    margin: 0 0 22px;
}

.sstack-pro-cta-button {
    background: #6B4FA0 !important;
    border-color: #5a3f8f !important;
    color: #fff !important;
    font-size: 15px !important;
    padding: 10px 28px !important;
    height: auto !important;
    border-radius: 5px !important;
}

.sstack-pro-cta-button:hover {
    background: #5a3f8f !important;
}

.sstack-pro-price-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: #7a6a9a;
}

/* Feature cards grid */
.sstack-pro-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.sstack-pro-feature-card {
    background: #fff;
    border: 1px solid #e0d5f5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.sstack-pro-feature-card-icon {
    display: block;
    font-size: 32px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.sstack-pro-feature-card h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #2c1f4a;
}

.sstack-pro-feature-card p {
    margin: 0;
    font-size: 13px;
    color: #5a5a5a;
}

/* ============================================================
   Layout: Settings Page Tabs & Wrap
   (moved from admin/settings-page.php inline <style>)
   ============================================================ */

.sstack-admin-wrap {
    display: flex;
    gap: 20px;
    margin: 20px 20px 20px 0;
}

.sstack-main-content {
    flex: 1;
    min-width: 0;
}

.sstack-tabs {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
}

.sstack-tab-nav {
    display: flex;
    border-bottom: 1px solid #ccd0d4;
    background: #f9f9f9;
}

.sstack-tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #50575e;
    border-right: 1px solid #ccd0d4;
    transition: all 0.2s;
}

.sstack-tab-button:last-child {
    border-right: none;
}

.sstack-tab-button:hover {
    background: #fff;
    color: #2271b1;
}

.sstack-tab-button.active {
    background: white;
    color: #2271b1;
    border-bottom: 3px solid #2271b1;
}

.sstack-tab-content {
    display: none;
    padding: 30px;
}

.sstack-tab-content.active {
    display: block;
}

.sstack-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Settings Sections */
.sstack-settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.sstack-settings-section:last-child {
    border-bottom: none;
}

.sstack-settings-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1d2327;
}

.sstack-settings-section .description {
    margin: 8px 0 0 0;
    color: #646970;
    font-size: 13px;
}

/* Form Fields */
.sstack-field {
    margin-bottom: 20px;
}

.sstack-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
}

.sstack-field input[type="text"],
.sstack-field input[type="url"],
.sstack-field input[type="number"],
.sstack-field select {
    width: 100%;
    max-width: 600px;
}

.sstack-field input[type="checkbox"] {
    margin-right: 8px;
}

/* Narrow number inputs (e.g. posts per page, excerpt length) */
.sstack-input-narrow {
    width: 100px !important;
}

/* Sidebar Boxes */
.sstack-stats-box,
.sstack-help-box {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.sstack-stats-box h3,
.sstack-help-box h3 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #1d2327;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.sstack-stats-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sstack-stats-box li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
}

.sstack-stats-box li:last-child {
    border-bottom: none;
}

.sstack-stats-box strong {
    color: #1d2327;
}

/* Sidebar nav list (Quick Links) */
.sstack-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sstack-nav-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.sstack-nav-list li:last-child {
    border-bottom: none;
}

.sstack-nav-list a {
    text-decoration: none;
}

.sstack-nav-list a:hover {
    text-decoration: underline;
}

/* Sidebar text helpers */
.sstack-sidebar-note {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.sstack-plugin-meta {
    margin: 0 0 10px 0;
    font-size: 13px;
}

.sstack-plugin-tagline {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Info / Status Boxes */
.sstack-info-box {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}

.sstack-info-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.sstack-info-box p {
    margin: 5px 0;
    font-size: 13px;
}

.sstack-warning-box {
    background: #fff9e6;
    border-left: 4px solid #f39c12;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.sstack-error-box {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}

/* Buttons */
.sstack-button-group {
    margin-top: 20px;
}

.sstack-submit-wrapper {
    display: block !important;
    visibility: visible !important;
}

.sstack-submit-wrapper .button-primary {
    display: inline-block !important;
}

/* Categories Display */
.sstack-categories-list {
    max-height: 300px;
    overflow-y: auto;
}

.sstack-category-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: #f6f7f7;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sstack-category-name {
    font-weight: 500;
}

.sstack-category-count {
    background: #2271b1;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* Help Content (within settings tab) */
.sstack-help-section {
    margin-bottom: 25px;
}

.sstack-help-section h4 {
    margin: 0 0 10px 0;
    color: #2271b1;
}

.sstack-help-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.sstack-help-section code {
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Sync status text helpers */
.sstack-success-text {
    color: #00a32a;
    margin: 5px 0;
}

.sstack-muted-text {
    font-size: 12px;
    color: #666;
    margin: 8px 0;
}

.sstack-lighter-text {
    font-size: 12px;
    color: #888;
    margin: 8px 0;
}

.sstack-pending-note {
    color: #2271b1;
}

.sstack-meta-divider {
    font-size: 12px;
    color: #666;
    border-top: 1px solid #e1e4e8;
    padding-top: 8px;
    margin: 10px 0 5px 0;
}

/* Schedule status pill */
.sstack-schedule-pill {
    background: #e7f5ff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #2271b1;
}

/* General repair/tool lists */
.sstack-tool-list {
    margin: 10px 0;
    padding-left: 20px;
}

/* Responsive: Settings layout */
@media (max-width: 1280px) {
    .sstack-admin-wrap {
        flex-direction: column;
    }

    .sstack-sidebar {
        width: 100%;
    }
}

@media (max-width: 782px) {
    .sstack-tab-nav {
        flex-wrap: wrap;
    }

    .sstack-tab-button {
        flex: 1 1 50%;
        border-right: none;
        border-bottom: 1px solid #ccd0d4;
    }
}

/* ============================================================
   Help Page
   (moved from admin/tabs/help.php inline <style>)
   ============================================================ */

.sstack-help-container {
    max-width: 1200px;
    margin: 0 auto;
}

.sstack-help-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.sstack-help-hero h2 {
    margin: 0 0 10px;
    font-size: 32px;
    color: white;
}

.sstack-help-hero p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

.sstack-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.sstack-help-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.sstack-help-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.sstack-help-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

.sstack-help-icon {
    font-size: 32px;
    line-height: 1;
}

.sstack-help-card h3 {
    margin: 0;
    font-size: 20px;
    color: #23282d;
}

.sstack-help-card p {
    margin: 0 0 15px;
    color: #50575e;
    line-height: 1.6;
}

.sstack-help-card ul,
.sstack-help-card ol {
    margin: 10px 0 15px;
    padding-left: 25px;
}

.sstack-help-card li {
    margin: 8px 0;
    color: #50575e;
    line-height: 1.6;
}

.sstack-help-card code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #d63638;
    border: 1px solid #e1e4e8;
}

.sstack-code-block {
    background: #23282d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    overflow-x: auto;
}

.sstack-code-block code {
    background: transparent;
    color: #a6e22e;
    border: none;
    padding: 0;
}

.sstack-tip-box {
    background: #e7f5ff;
    border-left: 4px solid #2271b1;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.sstack-success-box {
    background: #e6f7ed;
    border-left: 4px solid #00a32a;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.sstack-danger-box {
    background: #f8d7da;
    border-left: 4px solid #d63638;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.sstack-help-full-width {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
}

.sstack-help-full-width--warning {
    background: #fff9e6;
    border-left: 4px solid #f39c12;
}

.sstack-help-full-width--gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #e7eaf3 100%);
}

/* Inner content boxes within full-width sections */
.sstack-help-box-inner {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Heading colour modifiers used inside help content */
.sstack-heading--warning { margin-top: 0; color: #f39c12; }
.sstack-heading--success { margin-top: 0; color: #00a32a; }
.sstack-heading--error   { margin-top: 0; color: #d63638; }
.sstack-heading--info    { margin-top: 0; color: #2271b1; }

/* Large-print help body text */
.sstack-help-text-lg {
    font-size: 16px;
    line-height: 1.8;
}

.sstack-help-text-md {
    font-size: 15px;
    line-height: 1.8;
}

/* Help cols grid (workaround / quick-start) */
.sstack-help-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.sstack-attribute-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.sstack-attribute-table th {
    background: #f0f0f1;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e1e4e8;
}

.sstack-attribute-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e4e8;
}

.sstack-attribute-table tr:hover {
    background: #f9f9f9;
}

.sstack-quick-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.sstack-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sstack-quick-link:hover {
    background: #667eea;
    color: white;
}

@media (max-width: 768px) {
    .sstack-help-grid {
        grid-template-columns: 1fr;
    }
}

/* Settings page submit button padding (replaces inline style on .submit) */
.sstack-settings-submit {
    padding: 0 30px 30px 30px !important;
}
