/**
 * Joryio Admin Styles
 *
 * @package Joryio
 */

/* Settings page */
.joryio-settings {
    max-width: 800px;
}

.joryio-settings h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.joryio-logo {
    height: 30px;
    width: auto;
}

/* Cards */
.joryio-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}

.joryio-card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.3em;
}

/* Connection status */
.joryio-status {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.joryio-status.connected {
    background: #d4edda;
    color: #155724;
}

.joryio-status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.joryio-status .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.joryio-status.connected .status-indicator {
    background: #28a745;
}

.joryio-status.disconnected .status-indicator {
    background: #dc3545;
}

/* Store info */
.joryio-store-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.joryio-store-info p {
    margin: 5px 0;
}

/* Connect form */
.joryio-connect-form .description {
    margin-bottom: 15px;
    color: #666;
}

.joryio-connect-form .description a {
    color: #0073aa;
    text-decoration: none;
}

.joryio-connect-form .description a:hover {
    text-decoration: underline;
}

/* Sync table */
.joryio-sync-table {
    width: 100%;
    border-collapse: collapse;
}

.joryio-sync-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.joryio-sync-table td:first-child {
    font-weight: 600;
    width: 150px;
}

/* Form table adjustments */
.joryio-card .form-table th {
    width: 200px;
    padding-left: 0;
}

.joryio-card .form-table td {
    padding-left: 0;
}

/* Notices */
.joryio-notice {
    margin: 10px 0;
}

/* Buttons */
.joryio-card .button {
    margin-top: 10px;
}

.joryio-card .button-primary {
    background: #6366f1;
    border-color: #4f46e5;
}

.joryio-card .button-primary:hover {
    background: #4f46e5;
    border-color: #4338ca;
}

.joryio-card .button-primary:focus {
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #6366f1;
}

/* Input fields */
.joryio-card input[type="text"],
.joryio-card input[type="number"] {
    max-width: 100%;
}

/* Description text */
.joryio-card .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Checkbox labels */
.joryio-card label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .joryio-settings {
        padding: 10px;
    }

    .joryio-card .form-table th {
        width: auto;
        display: block;
        padding-bottom: 5px;
    }

    .joryio-card .form-table td {
        display: block;
        padding-top: 0;
    }

    .joryio-sync-table td:first-child {
        width: auto;
    }
}

/* Settings page overrides (were an inline <style> on the page before 1.6.25;
   kept last so they win as before). */
.joryio-settings { max-width: 800px; }
.joryio-logo { height: 30px; vertical-align: middle; margin-right: 10px; }
.joryio-card { background: #fff; border: 1px solid #ccd0d4; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.joryio-card h2 { margin-top: 0; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.joryio-status { display: flex; align-items: center; padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.joryio-status.connected { background: #d4edda; color: #155724; }
.joryio-status.disconnected { background: #f8d7da; color: #721c24; }
.joryio-status .status-indicator { width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; }
.joryio-status.connected .status-indicator { background: #28a745; }
.joryio-status.disconnected .status-indicator { background: #dc3545; }
.joryio-store-info { background: #f8f9fa; padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.joryio-store-info p { margin: 5px 0; }
.joryio-connect-form .description { margin-bottom: 15px; }
.joryio-sync-table { width: 100%; border-collapse: collapse; }
.joryio-sync-table td { padding: 10px; border-bottom: 1px solid #eee; }
.joryio-sync-table td:first-child { font-weight: 600; width: 150px; }
.joryio-warning { color: #8a4b00; }
.joryio-actions .button { margin-right: 8px; }
.joryio-form-block { border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }
.joryio-form-block[disabled] { opacity: .7; }
.joryio-muted { color: #646970; font-weight: normal; }
.joryio-map td, .joryio-map th { vertical-align: middle; }
