/**
 * Recognyze Admin Common Styles
 *
 * Common styles used across admin dashboard pages.
 *
 * @package Recognyze_Client
 */

/* Welcome Screen Styles */
.wprc-welcome-wrap {
    margin: 20px 0 0 0;
}

.wprc-welcome-wrap h2 {
    font-size: 20px;
    font-weight: 600;
}

.wprc-welcome-wrap h3 {
    font-size: 16px;
    font-weight: 600;
}

.wprc-welcome-card ul,
.wprc-welcome-card ol {
    line-height: 1.8;
}

@media (max-width: 782px) {
    .wprc-welcome-card>div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* Diagnostic Content Styles */
.wprc-diagnostic-content .postbox {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wprc-diagnostic-content .postbox-header {
    border-bottom: 1px solid #ddd;
}

.wprc-diagnostic-content .postbox-header h2 {
    margin: 0;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
}

.wprc-diagnostic-content table th {
    font-weight: 600;
}

.wprc-diagnostic-content code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* Spinning animation */
.wprc-spinning {
    animation: wprc-spin 1s infinite linear;
}

@keyframes wprc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Conflict notice styles */
.wprc-conflict-notice {
    border-left-color: #d63638;
}

.wprc-conflict-title {
    margin: 0.5em 0;
    font-size: 14px;
}

.wprc-conflict-title strong {
    color: #d63638;
}

.wprc-conflict-list-wrapper {
    margin-top: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-left: 3px solid #d63638;
    border-radius: 3px;
}

.wprc-conflict-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    list-style: disc;
}

.wprc-conflict-list li {
    margin: 4px 0;
}

.wprc-conflict-link {
    color: #2271b1;
    text-decoration: none;
}

.wprc-conflict-hint {
    color: #646970;
    font-size: 12px;
    margin-left: 8px;
}

.wprc-conflict-tip {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

/* ===== Dashboard Table Styles ===== */
.column-node-type {
    width: 100px;
}

.response-row.show {
    display: table-row !important;
}

.response-row td {
    padding: 0 !important;
    vertical-align: top;
    max-width: 100% !important;
    word-wrap: break-word;
    overflow: hidden;
}

.response-row .wprc-details {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.response-row .wprc-response-details {
    margin: 10px;
    max-width: calc(100% - 20px);
    box-sizing: border-box;
    overflow: hidden;
}

.response-row .wprc-response-details pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow-x: auto;
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    box-sizing: border-box;
}

.wprc-sign-all-btn {
    font-weight: 600 !important;
}

.wprc-sign-all-btn .dashicons {
    opacity: 0.9;
    vertical-align: middle;
    margin-right: 5px;
}

.wprc-sync-all-btn {
    font-weight: 600 !important;
}

.wprc-sync-all-btn .dashicons {
    opacity: 0.9;
    vertical-align: middle;
    margin-right: 5px;
}

.wprc-collapsible-section {
    display: none !important;
}

.tablenav-pages {
    float: right;
    margin: 0 0 9px;
}

.tablenav.top .tablenav-pages,
.tablenav.bottom .tablenav-pages {
    float: right;
    clear: none;
    margin: 0 0 9px;
}

.tablenav.top,
.tablenav.bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.tablenav.top .alignleft,
.tablenav.bottom .alignleft {
    margin-right: 8px;
}

.tablenav-pages .pagination-links {
    margin-left: 10px;
}

.tablenav-pages .button {
    padding: 0 10px;
    height: 30px;
    line-height: 28px;
}

.tablenav-pages .current-page {
    width: 45px;
    height: 30px;
    text-align: center;
}

.tablenav-pages .tablenav-pages-navspan.button {
    padding: 0 10px;
    cursor: default;
}

/* ===== Settings Page Styles ===== */
.nav-tab-wrapper .nav-tab .dashicons {
    margin-right: 5px;
    margin-top: 2px;
    float: left;
}

.wprc-tab-content {
    margin-top: 20px;
}

.wprc-bot-wall-status {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.wprc-bot-wall-status.enabled {
    background: #d1eddb;
    border-left: 4px solid #00a32a;
}

.wprc-bot-wall-status.disabled {
    background: #f8d7da;
    border-left: 4px solid #d63638;
}

.wprc-test-commands {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.wprc-test-commands code {
    background: #23282d;
    color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 3px;
    display: block;
    margin: 5px 0;
    word-break: break-all;
}

.wprc-signed-posts-list {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.wprc-signed-posts-list ul {
    margin: 0;
    padding-left: 20px;
}

.wprc-signed-posts-list li {
    margin: 5px 0;
}

/* ===== Export Page Styles ===== */
.spinning {
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#next-export-info {
    position: relative;
}

#refresh-export-status {
    transition: all 0.3s ease;
}

/* ===== Quick Edit Styles ===== */
.wprc-quick-edit-row {
    background: #f8f8f8;
}

.wprc-quick-edit-container {
    padding: 15px !important;
}

.wprc-quick-edit-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    max-width: 800px;
    margin: 0;
    text-align: left;
}

.wprc-quick-edit-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    color: #23282d;
    text-align: left;
}

.wprc-quick-edit-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 5px;
}

.wprc-quick-edit-field {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    text-align: left;
    position: relative;
}

.wprc-quick-edit-field label {
    display: inline-block;
    width: 120px;
    margin: 0;
    padding: 0;
    font-weight: normal;
    text-align: left;
    padding-right: 5px;
    color: #666;
}

.wprc-field-input {
    flex: 1;
    max-width: 500px;
    margin-left: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.wprc-quick-edit-field input,
.wprc-quick-edit-field textarea {
    width: 100%;
    padding: 3px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-top: 0;
    height: auto;
    font-size: 13px;
}

.wprc-quick-edit-field input[title],
.wprc-quick-edit-field textarea[title] {
    cursor: help;
}

.wprc-tooltip-icon {
    margin-left: 3px;
    color: #999;
    font-size: 14px;
    cursor: help;
    vertical-align: middle;
    display: inline-block;
}

.wprc-quick-edit-actions {
    margin-top: 15px;
    text-align: right;
}

.wprc-quick-edit-actions button {
    margin-left: 8px;
}

.wprc-quick-edit-save {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #006291 !important;
}

.wprc-quick-edit-save:hover {
    background: #006291 !important;
}

/* ===== Admin Footer Styles ===== */
/* Robust Sticky Footer for WordPress Admin */

/* 1. Ensure root elements allow expansion */
html,
body {
    height: 100%;
}

/* 2. Target the main content wrapper */
/* Use min-height: 100vh to force it to fill the viewport */
#wpcontent {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    /* Fix for admin bar offset if needed, though 100vh is usually fine/safe enough */
}

/* 3. Allow key content body to expand */
#wpbody {
    flex: 1 0 auto !important;
}

/* 4. Footer Configuration */
/* Stick to bottom using margin-top: auto */
#wpfooter {
    flex-shrink: 0 !important;
    position: relative !important;
    /* Ensure it's not absolute */
    inset: auto !important;
    /* Reset top/left/right/bottom if set */
    margin-top: auto !important;
    /* Push to bottom */

    /* Layout */
    width: 100% !important;
    padding: 10px 20px;
    background: #f0f0f1;
    border-top: 1px solid #ddd;
    box-sizing: border-box;

    /* Ensure z-index is correct */
    z-index: 100;
}

#wpfooter p {
    margin: 0;
    line-height: 20px;
}

#footer-left {
    float: left;
}

#footer-upgrade {
    float: right;
}

.clear {
    clear: both;
}