/* ==========================================================================
   BlueFeed – Admin Settings Styles

   Type scale (base 13px, matching WP admin):
     - h1 page title : 22px / 1.3 / 700
     - h2 card title : 16px / 1.4 / 600
     - h3 sub title  : 14px / 1.4 / 600
     - body          : 13px / 1.5 / 400
     - description   : 13px / 1.5 / 400 / #646970
     - micro / meta  : 12px / 1.4 / 500 / #646970
   Use color & weight (not size) for hierarchy where possible.
   ========================================================================== */

.bluefeed-admin-wrap {
    max-width: 880px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #1d2327;
}

.bluefeed-admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.bluefeed-admin-header h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bluefeed-admin-header .bluefeed-version {
    background: #e8f4ff;
    color: #1185fe;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1;
    margin-left: 0;
}

/* ---------- Tab Navigation ---------- */

.bluefeed-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
}

.bluefeed-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    background: none;
    color: #646970;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.bluefeed-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.bluefeed-tab:hover {
    color: #1d2327;
}

.bluefeed-tab.is-active {
    color: #1185fe;
    border-bottom-color: #1185fe;
    font-weight: 600;
}

.bluefeed-tab.is-active .dashicons {
    color: #1185fe;
}

/* ---------- Tab Panels ---------- */

.bluefeed-tab-panel {
    display: none;
}

.bluefeed-tab-panel.is-active {
    display: block;
    animation: bluefeedFadeIn 0.2s ease;
}

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

.bluefeed-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.bluefeed-card h2 {
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid #c3c4c7;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bluefeed-card h2 .dashicons {
    color: #1185fe;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.bluefeed-card > p:first-of-type {
    margin-top: 0;
    color: #646970;
}

.bluefeed-card p,
.bluefeed-card .description {
    font-size: 13px;
    line-height: 1.5;
    color: #646970;
}

.bluefeed-card .form-table th {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    padding: 16px 10px 16px 0;
}

.bluefeed-card .form-table td {
    padding: 16px 10px;
    font-size: 13px;
}

.bluefeed-card .form-table input.regular-text {
    border-radius: 6px;
    border: 1px solid #c3c4c7;
    padding: 6px 12px;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bluefeed-card .form-table input:focus {
    border-color: #1185fe;
    box-shadow: 0 0 0 1px #1185fe;
    outline: none;
}

.bluefeed-shortcode-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.bluefeed-shortcode-table th {
    text-align: left;
    font-weight: 600;
    color: #1d2327;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.bluefeed-shortcode-table th:first-child { border-radius: 8px 0 0 0; }
.bluefeed-shortcode-table th:last-child { border-radius: 0 8px 0 0; }

.bluefeed-shortcode-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.bluefeed-shortcode-table tr:last-child td { border-bottom: 0; }
.bluefeed-shortcode-table tr:hover td { background: #f8fafc; }

.bluefeed-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f4f8;
    border: 1px solid #dce3ea;
    border-radius: 6px;
    padding: 5px 8px 5px 12px;
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 12px;
    color: #1d2327;
    line-height: 1.4;
}

.bluefeed-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    color: #787c82;
    transition: all 0.15s;
    flex-shrink: 0;
}

.bluefeed-copy-btn:hover {
    color: #1185fe;
    background: #e8f4ff;
    border-color: #b8daff;
}

.bluefeed-copy-btn.copied {
    color: #00a32a;
}

.bluefeed-copy-btn .bluefeed-icon-copy { display: block; }
.bluefeed-copy-btn .bluefeed-icon-check { display: none; }

.bluefeed-examples-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.bluefeed-example-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 12px;
    color: #1d2327;
    line-height: 1.4;
}

.bluefeed-example-item code {
    flex: 1;
    background: none;
    padding: 0;
    font-size: inherit;
}

.bluefeed-cache-card .button {
    border-radius: 6px;
}

#bluefeed-cache-status {
    font-size: 13px;
    color: #00a32a;
    font-weight: 500;
}

.bluefeed-card h3 {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    margin: 24px 0 10px;
    color: #1d2327;
}

.bluefeed-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.bluefeed-color-section-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #1d2327;
    margin: 24px 0 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bluefeed-color-section-title:first-child {
    margin-top: 8px;
}

.bluefeed-color-section-title .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #1185fe;
}

@media (max-width: 960px) {
    .bluefeed-color-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .bluefeed-color-grid { grid-template-columns: 1fr; }
}

.bluefeed-color-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bluefeed-color-item label {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

.bluefeed-color-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bluefeed-color-picker {
    width: 36px;
    height: 36px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.bluefeed-alpha-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bluefeed-alpha-slider {
    width: 60px;
    height: 6px;
    cursor: pointer;
    accent-color: #1185fe;
}

.bluefeed-alpha-label {
    font-size: 12px;
    color: #687684;
    min-width: 32px;
    text-align: right;
    font-family: Menlo, Consolas, monospace;
}

.bluefeed-color-text {
    width: 90px !important;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 5px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
}

.bluefeed-color-text:focus {
    border-color: #1185fe;
    box-shadow: 0 0 0 1px #1185fe;
    outline: none;
}

.bluefeed-color-clear {
    background: none;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #a7aaad;
    font-size: 16px;
    line-height: 1;
    padding: 3px 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.bluefeed-color-clear:hover {
    color: #b91c1c;
    border-color: #b91c1c;
    background: #fef2f2;
}

/* ---------- Responsive tabs ---------- */

@media (max-width: 600px) {
    .bluefeed-tabs {
        flex-wrap: wrap;
    }
    .bluefeed-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}
