/**
 * assets/css/admin-styles.css
 * Admin styles for the REEID Translate Settings page.
 * - Two-column metabox, FAQ, tools
 * - Info & Tips polish
 * - Responsive layout
 */

/*-------------------------------------------
 * 1. Two‐Column Metabox Layout
 *-------------------------------------------*/
 #reeid_translate_box select {
    width: 95%;
    box-sizing: border-box;
}
.meta-box-sortables select {
    max-width: 95%!important;
}
#reeid-settings-wrapper.metabox-holder.columns-2 {}
#reeid-settings-left.postbox-container,
#reeid-settings-right.postbox-container {
    width: 48%;
}
#reeid-settings-left .postbox,
#reeid-settings-right .postbox {
    margin-bottom: 20px;
}

/*-------------------------------------------
 * 2. Dashicon Spacing (Info & Tips header)
 *-------------------------------------------*/
#reeid-settings-right .hndle .dashicons {
    margin-right: 6px;
    vertical-align: middle;
}

/*-------------------------------------------
 * 3. Info & Tips Panel Typography & Spacing
 *-------------------------------------------*/
#reeid-settings-right .postbox .inside {
    font-size: 14px;
    line-height: 1.4;
    background-color: #fcfcfc;
    border-color: #ddd;
}
#reeid-settings-right .postbox .inside ul {
    margin-left: 1.2em;
    padding-left: 0;
}
#reeid-settings-right .postbox .inside ul li {
    margin-bottom: 8px;
}
#reeid-settings-right .inside ul li + li {
    border-top: 1px solid #e5e5e5;
    padding-top: 8px;
    margin-top: 8px;
}
#reeid-settings-right .postbox:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/*-------------------------------------------
 * 4. Responsive Adjustments
 *-------------------------------------------*/
@media (max-width: 900px) {
    #reeid-settings-left.postbox-container,
    #reeid-settings-right.postbox-container {
        width: 100% !important;
        float: none !important;
    }
    .reeid-tools-row { flex-direction: column; gap: 0; }
}
@media (max-width: 700px) {
    #reeid-settings-left.postbox-container,
    #reeid-settings-right.postbox-container {
        width: 100% !important;
        float: none !important;
    }
}

/*-------------------------------------------
 * 5. Tools Tab: Two Column Layout
 *-------------------------------------------*/
.reeid-tools-row { display: flex; gap: 40px; margin-top: 30px; }
.reeid-tools-col { flex: 1 1 0; min-width: 320px; }
.reeid-tools-col h2 { margin-top: 32px; }
@media (max-width: 900px) {
    .reeid-tools-row { flex-direction: column; gap: 0; }
}

/*-------------------------------------------
 * 6. Two-Column FAQ (Settings > FAQ Tab, Accordion)
 *-------------------------------------------*/
.reeid-faq-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    margin-top: 10px;
}
.reeid-faq-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.reeid-faq-item {
    background: #f8faff;
    border-radius: 7px;
    border: 1px solid #e5eafd;
    box-shadow: 0 1px 4px #e9eafd22;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.14s;
}
.reeid-faq-item:focus-within,
.reeid-faq-item.open {
    box-shadow: 0 4px 16px #b6d5fa55;
    border-color: #9ac4ef;
}
.reeid-faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #1d325b;
    padding: 8px 14px 8px 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.14s;
}
.reeid-faq-q:focus { outline: 2px solid #2871df; background: #e9eafd; }
.reeid-faq-chevron {
    margin-left: 8px;
    font-size: 1.1em;
    transition: transform 0.22s;
}
.reeid-faq-item.open .reeid-faq-chevron { transform: rotate(180deg); }
.reeid-faq-a {
    padding: 10px 18px 12px 18px;
    color: #264;
    font-size: 14px;
    background: #fff;
    border-top: 1px solid #e9eafd;
    animation: fadeInFAQ 0.18s;
}
@keyframes fadeInFAQ {
    from { opacity: 0; transform: translateY(-6px);}
    to   { opacity: 1; transform: none;}
}
@media (max-width: 800px) {
    .reeid-faq-cols { grid-template-columns: 1fr; }
}

/* FAQ Heading Color */
.reeid-faq-tab h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1742c3;
}
.reeid-faq-cols strong {
    color: #24377a;
    font-weight: 600;
}

/* REEID FAQ / Documentation Hub */
.reeid-faq-wrapper {
    max-width: 1040px;
}

.reeid-faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.reeid-faq-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#reeid-faq-search {
    width: 100%;
    max-width: 460px;
    padding: 8px 12px;
    margin: 16px 0 20px;
    border-radius: 6px;
}

.reeid-faq-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 14px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.reeid-faq-card h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.reeid-faq-item + .reeid-faq-item {
    margin-top: 10px;
}

.reeid-faq-question {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    background: #f6f8fa;
    border-radius: 6px;
    transition: background .2s ease;
}

.reeid-faq-question:hover {
    background: #e9eff6;
}

.reeid-faq-answer {
    display: none;
    padding: 14px 18px 18px;
    color: #555;
    line-height: 1.65;
}

.reeid-faq-answer ul {
    margin: 8px 0 8px 18px;
}

.reeid-faq-answer pre {
    background: #f6f8fa;
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
}

.reeid-chevron {
    font-size: 18px;
    transition: transform .25s ease;
}

.reeid-faq-question.reeid-open .reeid-chevron {
    transform: rotate(90deg);
}

/* REEID Settings Tab Layout */
.reeid-settings-grid {
    display: grid;
    grid-template-columns: minmax(420px, 46%) minmax(420px, 54%);
    gap: 24px;
    align-items: start;
    width: 100%;
    }

.reeid-settings-main,
.reeid-settings-pro-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.reeid-settings-main {
    padding: 22px 24px 24px;
}

.reeid-settings-main h2 {
    margin-top: 0;
}

.reeid-settings-main .form-table th {
    width: 210px;
}

.reeid-settings-pro-card {
    overflow: hidden;
    border-color: #c3dafe;
    background: #fff;
}

.reeid-settings-pro-head {
    padding: 20px 22px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #dbeafe;
    color: #1e293b;
}

.reeid-settings-pro-head h3 {
    margin: 0 0 6px;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.25;
}

.reeid-settings-pro-head p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
}

.reeid-settings-pro-body {
    padding: 18px 20px 20px;
}

.reeid-settings-pro-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    margin: 20px auto 10px;
    padding: 11px 16px;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
}

.reeid-settings-pro-button:hover,
.reeid-settings-pro-button:focus {
    background: #135e96;
    color: #fff;
}

.reeid-settings-pro-note {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.reeid-settings-preview {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.reeid-settings-preview-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.reeid-settings-preview-box {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.reeid-settings-preview-box strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
    font-size: 13px;
}

.reeid-settings-preview-box span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

@media screen and (max-width: 1100px) {
    .reeid-settings-grid {
        grid-template-columns: 1fr;
    }

    .reeid-settings-main .form-table th {
        width: auto;
    }
}

.reeid-settings-pro-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.reeid-settings-pro-highlight {
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fafc;
}

.reeid-settings-pro-icon {
    display: block;
    margin-bottom: 9px;
    font-size: 22px;
    line-height: 1;
}

.reeid-settings-pro-highlight strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.reeid-settings-pro-highlight small {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

@media screen and (max-width: 782px) {
    .reeid-settings-pro-highlights {
        grid-template-columns: 1fr;
    }
}

.reeid-free-summary {
    margin-top: 22px;
    padding: 15px 17px;
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    border-radius: 8px;
}

.reeid-free-summary strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.reeid-free-summary span {
    display: block;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.reeid-free-summary-secondary {
    border-left-color: #f97316;
    background: #fff7ed;
}

/* REEID Tools Layout */
.reeid-tools-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.reeid-tools-col {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 16px 18px;
    border-radius: 6px;
}

.reeid-tools-col h2 {
    margin-top: 0;
}

/* Stack on small screens */
@media (max-width: 1100px) {
    .reeid-tools-row {
        grid-template-columns: 1fr;
    }
}


/* REEID Woo Inline Translation Panel */
#reeid_translations_panel .reeid-tr-table {
    width: 100%;
    max-width: 1100px;
}

#reeid_translations_panel .reeid-tr-table th {
    width: 220px;
    text-align: left;
    vertical-align: top;
    padding-top: 10px;
}

#reeid_translations_panel .reeid-tr-table td {
    vertical-align: top;
}

#reeid_translations_panel .reeid-tr-table input[type="text"],
#reeid_translations_panel .reeid-tr-table textarea {
    width: 100%;
    max-width: 820px;
    box-sizing: border-box;
}

#reeid_translations_panel #reeid-tr-langselect {
    width: 260px;
    max-width: 260px;
    vertical-align: middle;
}

/* REEID Woo Inline Translation Panel — UX polish */
#reeid_translations_panel {
    padding: 18px 20px;
}

#reeid_translations_panel .reeid-tr-table {
    max-width: none;
    margin: 0;
}

#reeid_translations_panel .reeid-tr-table th {
    width: 190px;
    padding: 12px 18px 12px 0;
    font-weight: 700;
    color: #1d2327;
}

#reeid_translations_panel .reeid-tr-table td {
    padding: 8px 0 12px;
}

#reeid_translations_panel .reeid-tr-table label {
    display: block;
    margin: 0;
}

#reeid_translations_panel #reeid-tr-langselect {
    width: 100%;
    max-width: 320px;
}

#reeid_translations_panel .reeid-tr-table input[type="text"],
#reeid_translations_panel .reeid-tr-table textarea {
    width: 100%;
    max-width: 860px;
}

#reeid_translations_panel .reeid-wide-textarea {
    min-height: 110px;
}

@media screen and (max-width: 900px) {
    #reeid_translations_panel .reeid-tr-table,
    #reeid_translations_panel .reeid-tr-table tbody,
    #reeid_translations_panel .reeid-tr-table tr,
    #reeid_translations_panel .reeid-tr-table th,
    #reeid_translations_panel .reeid-tr-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #reeid_translations_panel .reeid-tr-table th {
        padding: 14px 0 4px;
    }

    #reeid_translations_panel .reeid-tr-table td {
        padding: 0 0 10px;
    }

    #reeid_translations_panel #reeid-tr-langselect,
    #reeid_translations_panel .reeid-tr-table input[type="text"],
    #reeid_translations_panel .reeid-tr-table textarea {
        max-width: 100%;
    }
}

/* REEID Woo Inline Translation Panel — action button spacing */
#reeid_translations_panel #reeid-tr-langselect {
    margin-bottom: 8px;
}

#reeid_translations_panel #reeid-wc-del-all,
#reeid_translations_panel .reeid-wc-delete-translation,
#reeid_translations_panel button[name*="delete"] {
    margin-top: 0;
    margin-right: 6px;
}

@media screen and (min-width: 901px) {
    #reeid_translations_panel #reeid-tr-langselect {
        display: inline-block;
        width: calc(100% - 390px);
        max-width: 820px;
        margin-right: 10px;
        margin-bottom: 0;
    }
}