/**
 * FAQ Admin Styles
 */

.faq-admin-wrap {
    max-width: 1400px;
}

.faq-admin-container {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.faq-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

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

.faq-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.faq-section .description {
    color: #646970;
    margin-bottom: 15px;
}

/* Category Section */
.faq-form-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.faq-form-inline input[type="text"] {
    flex: 1;
    max-width: 400px;
    height: 40px;
    padding: 0 12px;
}

.faq-categories-list {
    margin-top: 15px;
}

.faq-category-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.faq-category-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.faq-category-items .category-name {
    font-weight: 600;
    color: #1d2327;
}

.faq-category-items .delete-category {
    color: #b32d2e;
    border-color: #b32d2e;
}

.faq-category-items .delete-category:hover {
    background: #b32d2e;
    color: #fff;
}

/* FAQ Form */
.faq-form {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
}

.faq-form-row {
    margin-bottom: 20px;
}

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

.faq-form-row input[type="text"],
.faq-form-row input[type="number"],
.faq-form-row select,
.faq-form-row textarea {
    width: 100%;
    max-width: 800px;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.faq-form-row textarea {
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.faq-form-row input[type="number"] {
    max-width: 100px;
}

.faq-form-row small.description {
    display: block;
    margin-top: 5px;
    color: #646970;
    font-size: 13px;
}

.faq-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* FAQ List Table */
.faq-list-section table {
    margin-top: 15px;
}

.faq-list-section td {
    vertical-align: middle;
}

.faq-list-section .button-small {
    padding: 4px 8px;
    font-size: 12px;
    height: auto;
    line-height: 1.5;
}

.faq-list-section .edit-faq {
    margin-right: 5px;
}

.faq-list-section .delete-faq {
    color: #b32d2e;
    border-color: #b32d2e;
}

.faq-list-section .delete-faq:hover {
    background: #b32d2e;
    color: #fff;
    border-color: #b32d2e;
}

/* Empty State */
.faq-empty {
    padding: 40px 20px;
    text-align: center;
    color: #646970;
    background: #f6f7f7;
    border: 2px dashed #dcdcde;
    border-radius: 4px;
    font-size: 14px;
}

/* Loading State */
.faq-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.faq-message {
    padding: 12px 15px;
    margin: 15px 0;
    border-left: 4px solid #00a32a;
    background: #f0f6fc;
    font-size: 14px;
}

.faq-message.error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

/* Form editing state */
.faq-form.editing #faq-form .save-text {
    display: none;
}

.faq-form.editing #faq-form .update-text {
    display: inline;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .faq-form-inline {
        flex-direction: column;
    }

    .faq-form-inline input[type="text"] {
        max-width: 100%;
    }

    .faq-category-items {
        grid-template-columns: 1fr;
    }

    .faq-list-section table {
        font-size: 13px;
    }

    .faq-list-section .button-small {
        font-size: 11px;
        padding: 3px 6px;
    }
}
