/**
 * Dotes FAQ Generator - settings page shell shared with the other Dotes plugins:
 * header (Dotes logo, plugin name, version and Pro status), tab fade and save bar.
 */

/* ---------- Header ---------- */
.dotes-faq-tabs .dotes-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin: 20px 0 24px;
    padding: 20px 24px;
    overflow: hidden;
    border: 1px solid #e4e1f5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(76, 29, 149, .18);
}

.dotes-faq-tabs .dotes-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 60%, #0ea5e9 100%);
}

.dotes-faq-tabs .dotes-header__brand {
    display: inline-flex;
    flex: none;
    line-height: 0;
}

.dotes-faq-tabs .dotes-header__brand:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 4px;
    border-radius: 4px;
}

.dotes-faq-tabs .dotes-header__brand img {
    width: 96px;
    height: auto;
}

.dotes-faq-tabs .dotes-header__divider {
    flex: none;
    width: 1px;
    height: 40px;
    background: #e4e1f5;
}

.dotes-faq-tabs .dotes-header__title {
    flex: 1;
    min-width: 220px;
}

.dotes-faq-tabs .dotes-header__title h1 {
    margin: 0;
    padding: 0;
    color: #1e1b4b;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.dotes-faq-tabs .dotes-header__title p {
    margin: 4px 0 0;
    color: #646970;
    font-size: 13px;
}

.dotes-faq-tabs .dotes-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dotes-faq-tabs .dotes-header__version {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #50575e;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dotes-faq-tabs .dotes-header__status {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.dotes-faq-tabs .dotes-header__status.is-pro {
    background: #ede9fe;
    color: #5b21b6;
}

.dotes-faq-tabs .dotes-header__status.is-pro::before {
    content: "★ ";
}

.dotes-faq-tabs .dotes-header__status.is-upgrade {
    background: #7c3aed;
    color: #fff;
}

.dotes-faq-tabs .dotes-header__status.is-upgrade:hover,
.dotes-faq-tabs .dotes-header__status.is-upgrade:focus {
    background: #6d28d9;
    color: #fff;
}

.dotes-faq-tabs .dotes-header__status.is-warning {
    background: #fcf3e6;
    color: #8a4b00;
}

@media (max-width: 600px) {
    .dotes-faq-tabs .dotes-header {
        padding: 18px 16px;
    }

    .dotes-faq-tabs .dotes-header__divider {
        display: none;
    }

    .dotes-faq-tabs .dotes-header__title {
        flex-basis: 100%;
    }
}

/* ---------- Tabs: fade between tabs (admin-page.js), no movement ---------- */
@keyframes dotes-faq-tab-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dotes-faq-tabs .tab-content.active {
    animation: dotes-faq-tab-fade-in .18s ease-out;
}

.dotes-faq-tabs .tab-content.is-leaving {
    opacity: 0;
    transition: opacity .12s ease-in;
}

@media (prefers-reduced-motion: reduce) {
    .dotes-faq-tabs .tab-content.active { animation: none; }
    .dotes-faq-tabs .tab-content.is-leaving { transition: none; }
}

.dotes-faq-tabs .dotes-tabs-nav .dotes-tab-emoji {
    margin-right: 4px;
}

/* ---------- Save bar (sticky at the bottom of the tab) ---------- */
.dotes-faq-tabs .dotes-savebar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    margin: 24px -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid #dcdcde;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -6px 16px -12px rgba(0, 0, 0, .25);
}

.dotes-faq-tabs .dotes-savebar .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dotes-faq-tabs .dotes-savebar .dashicons {
    margin-top: 0;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ---------- Settings sections ---------- */
.dotes-faq-tabs .dotes-faq-settings-intro {
    max-width: 760px;
    margin: 0 0 16px;
    color: #50575e;
}

.dotes-faq-tabs .dotes-faq-section {
    margin: 0 0 24px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
}

.dotes-faq-tabs .dotes-faq-section > h3 {
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 15px;
}

.dotes-faq-tabs .dotes-faq-section > h3 .dashicons {
    margin-right: 6px;
    color: #2271b1;
}

.dotes-faq-tabs .dotes-faq-section > p.dotes-faq-section__intro {
    margin: 0;
    padding: 12px 20px 0;
    color: #50575e;
}

.dotes-faq-tabs .dotes-faq-section > .form-table {
    margin: 0;
    width: 100%;
}

/* ---------- "Pro" tab with the add-on: feature cards ---------- */
.dotes-faq-tabs .dotes-faq-pro-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.dotes-faq-tabs .dotes-faq-pro-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
    color: #1d2327;
    text-decoration: none;
}

.dotes-faq-tabs a.dotes-faq-pro-card:hover,
.dotes-faq-tabs a.dotes-faq-pro-card:focus {
    border-color: #2271b1;
    color: #1d2327;
}

.dotes-faq-tabs .dotes-faq-pro-card .dashicons {
    color: #2271b1;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.dotes-faq-tabs .dotes-faq-pro-card span:not(.dashicons) {
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- FAQ list header ---------- */
.dotes-faq-tabs .faq-management-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.dotes-faq-tabs .faq-management-header .description {
    flex: 1;
    min-width: 260px;
    margin: 0;
}
