@CHARSET "ISO-8859-1";


/* ----- FAQ Magic Meta Box Layout ----- */
#faqm-meta-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Ensure columns share available space */
#faqm-json-create,
#faqm-json-view {
    flex: 1;
    min-width: 0; /* prevents flex from forcing wide columns */
}

/* Make schema preview scrollable if too long */
#faqm-json-view pre {
    max-height: 500px;
    overflow: auto;
    background: #f7f7f7;
    padding: 10px;
    border: 1px solid #ddd;
}

/* Responsive: stack columns on narrow screens */
@media (max-width: 900px) {
    #faqm-meta-box {
        flex-direction: column;
    }

    #faqm-json-create,
    #faqm-json-view {
        width: 100%;
    }
}

/* Tabs navigation */
.faqm-tabs-nav {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccd0d4;
    gap: 5px;
}

.faqm-tab-btn {
    background: #f6f7f7;
    border: 1px solid #ccd0d4;
    border-bottom: none;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #50575e;
    border-radius: 4px 4px 0 0;
    outline: none;
    transition: background 0.2s;
}

.faqm-tab-btn:not(.active):hover {
    background: #f0f0f1;
    color: #1d2327;
}

.faqm-tab-btn.active {
    background: #fff;
    color: #2271b1; /* WordPress blue */
    font-weight: 600;
    border-bottom: 1px solid #fff; /* seamless with content */
}

/* Tab content */
.faqm-tab-content {
    display: none;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 0 4px 4px 4px;
    padding: 12px;
}

.faqm-tab-content.active {
    display: block;
}

/* AI Suggest button */
.faqm-ai-btn {
    background-color: #fff298 !important;
    border-color: #222 !important;
    border: none;
    color: #222 !important;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.faqm-ai-btn:hover {
    background-color: #ffec69 !important;   /* darker yellow hover */
    color: #000 !important;
    transform: translateY(-1px);
}

/* ----- Options / Settings Table Format ----- */

#faqm-main-form{
    display: block;
}

#faqm-main-form td,  #faqm-main-form th {
    padding: 14px !important;
}

tr.faqm-input-hdr {
    background: #dedede;
}

#faqm_schema_text {
    background: #f5f5f5;     /* light grey background */
    border: 1px solid #ddd;  /* subtle border */
    padding: 10px;
    max-height: 500px;       /* restrict vertical size */
    overflow: auto;          /* scrollbars if needed */
    white-space: pre-wrap;   /* wrap long lines instead of horizontal overflow */
    word-wrap: break-word;   /* break long words */
    font-family: monospace;  /* code-like font */
    font-size: 13px;
}

/* ----- Delete link inside FAQ item ----- */
.faqm_faq_item .faqm_delete_faq {
    margin-left: 8px;
    color: #b32d2e; /* WP admin red */
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.faqm_faq_item .faqm_delete_faq:hover {
    color: #dc3232; /* brighter red */
    text-decoration: none;
}

/* ----- Option Page Toggle Switch ----- */
.faqm_switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.faqm_switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.faqm_slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 30px;
    -webkit-transition: .4s;
    transition: .4s;
}

.faqm_slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .faqm_slider {
    background-color: #2196F3;
}

input:focus + .faqm_slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .faqm_slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* ----- FAQ Styling ----- */
.faqm_faq_item {
    margin: 5px 0;
    padding: 6px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

/* ----- FAQ Status messages ----- */
.faqm_status {
    margin-bottom: 8px;
    font-size: 13px;
    min-height: 18px; /* keeps space so layout doesn't jump */
}

.faqm-status-success { color: green; }
.faqm-status-error { color: red; }