/*
 * Zyonix Related Posts - Admin Styles v1.0.0
 */

/* =============================================
   HEADER
   ============================================= */
.zyonrp-settings-wrap {
    max-width: 1100px;
}

.zyonrp-admin-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.zyonrp-admin-header .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #0073aa;
}

.zyonrp-admin-header h1 {
    margin: 0 0 4px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
}

.zyonrp-admin-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* =============================================
   GRID
   ============================================= */
.zyonrp-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.zyonrp-full-width {
    grid-column: 1 / -1;
}

/* =============================================
   CARD
   ============================================= */
.zyonrp-settings-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 24px;
}

.zyonrp-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.zyonrp-card-title .dashicons {
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* =============================================
   FIELDS
   ============================================= */
.zyonrp-field {
    margin-bottom: 18px;
}

.zyonrp-field:last-child {
    margin-bottom: 0;
}

.zyonrp-field > label,
.zyonrp-toggle-info label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #2c2c2c;
    margin-bottom: 6px;
}

.zyonrp-field input[type="text"],
.zyonrp-field input[type="number"],
.zyonrp-field select,
.zyonrp-field textarea {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
}

.zyonrp-field input[type="number"] {
    max-width: 90px;
}

.zyonrp-field input:focus,
.zyonrp-field select:focus,
.zyonrp-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.zyonrp-desc {
    font-size: 0.78rem;
    color: #888;
    margin: 5px 0 0;
}

/* =============================================
   TOGGLE SWITCH
   ============================================= */
.zyonrp-toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.zyonrp-toggle-field:last-child {
    border-bottom: none;
}

.zyonrp-toggle-info {
    flex: 1;
}

.zyonrp-toggle-info label {
    margin-bottom: 2px !important;
}

.zyonrp-toggle-info .zyonrp-desc {
    margin-top: 2px;
}

/* Toggle Switch */
.zyonrp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.zyonrp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.zyonrp-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.zyonrp-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.zyonrp-switch input:checked + .zyonrp-slider {
    background: #0073aa;
}

.zyonrp-switch input:checked + .zyonrp-slider::before {
    transform: translateX(20px);
}

.zyonrp-switch input:focus + .zyonrp-slider {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

/* =============================================
   CHECKBOX GROUP (post types)
   ============================================= */
.zyonrp-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.zyonrp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f7fa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.zyonrp-checkbox-label:has(input:checked) {
    background: #e6f2f8;
    border-color: #0073aa;
    color: #005a87;
    font-weight: 600;
}

.zyonrp-checkbox-label input {
    margin: 0;
    accent-color: #0073aa;
}

/* =============================================
   SHORTCODE INFO
   ============================================= */
.zyonrp-shortcode-info {
    background: #f5f7fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 16px;
    font-size: 0.85rem;
}

.zyonrp-shortcode-info code {
    background: #e9ecf0;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #c0392b;
}

/* =============================================
   SUBMIT ROW
   ============================================= */
.zyonrp-submit-row {
    margin-top: 24px;
    padding-top: 0;
}

.zyonrp-save-btn.button-primary {
    height: 40px;
    line-height: 40px;
    padding: 0 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .zyonrp-settings-grid {
        grid-template-columns: 1fr;
    }
    .zyonrp-full-width {
        grid-column: auto;
    }
}
