/**
 * Admin Stylesheet for Kabook Auto Schema & Accordion * 
 * @package Kabook Auto Rank Math Snippet
 * @version 1.4.0
 */

/* -----------------------------------------------------------------------------
 * 1. Main Wrapper & Typography
 * ----------------------------------------------------------------------------- */
.karms-admin-wrapper {
    max-width: 1000px;
    margin: 30px auto;
    width: 95%;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: ltr; /* Default LTR orientation */
}

/* RTL Support */
body.rtl .karms-admin-wrapper {
    direction: rtl;
}

/* -----------------------------------------------------------------------------
 * 2. Header Section (Gradient & Logo)
 * ----------------------------------------------------------------------------- */
.karms-header {
    background: linear-gradient(135deg, #005bea 0%, #00c6fb 100%);
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 91, 234, 0.15);
}

.karms-header h1 {
    color: #fff !important;
    margin: 0 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.karms-logo {
    max-width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.karms-logo img {
    max-width: 100%;
    height: auto;
}

/* -----------------------------------------------------------------------------
 * 3. Inner Content Card
 * ----------------------------------------------------------------------------- */
.karms-inner-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* -----------------------------------------------------------------------------
 * 4. Navigation Tabs (Classic Layout)
 * ----------------------------------------------------------------------------- */
.karms-nav-tab-wrapper {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #eef2f6 !important;
    margin-bottom: 30px !important;
    padding-bottom: 0 !important;
}

.karms-nav-tab {
    cursor: pointer;
    background: transparent !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 12px 25px !important;
    color: #8898aa !important;
    border-radius: 8px 8px 0 0 !important;
    position: relative;
    border: none !important;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.karms-nav-tab:hover {
    color: #005bea !important;
}

.karms-nav-tab-active {
    color: #005bea !important;
    background: #f4f7fb !important;
}

/* Active tab bottom indicator */
.karms-nav-tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #005bea;
    border-radius: 2px;
}

/* -----------------------------------------------------------------------------
 * 5. Settings Field Rows
 * ----------------------------------------------------------------------------- */
.karms-settings-section-wrap h2 {
    font-size: 1.3em;
    color: #005bea;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.karms-field-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f4f7fb;
    gap: 40px;
}

/* Flex direction handles RTL automatically via parent context */
body.rtl .karms-field-row {
    flex-direction: row; 
}

.karms-field-label {
    flex: 0 0 280px;
    text-align: left;
}

body.rtl .karms-field-label {
    text-align: right;
}

.karms-field-label label {
    font-weight: 700;
    color: #2c3338;
    font-size: 15px;
}

.karms-field-input {
    flex: 1;
}

.karms-field-input .description {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #646970;
    line-height: 1.6;
}

/* -----------------------------------------------------------------------------
 * 6. Inputs & Form Controls
 * ----------------------------------------------------------------------------- */
.karms-admin-wrapper input[type="text"], 
.karms-admin-wrapper input[type="number"], 
.karms-admin-wrapper select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    height: 44px;
    padding: 0 15px;
    width: 100%;
    max-width: 400px;
    background-color: #fdfdfd;
    font-family: inherit;
}

.karms-admin-wrapper input:focus,
.karms-admin-wrapper select:focus {
    border-color: #005bea;
    box-shadow: 0 0 0 3px rgba(0, 91, 234, 0.08);
    outline: none;
}

.karms-admin-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 8px;
    border-radius: 6px;
}

/* -----------------------------------------------------------------------------
 * 7. Footer Actions
 * ----------------------------------------------------------------------------- */
.karms-submit-area {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.rtl .karms-submit-area {
    flex-direction: row-reverse;
}

.button-primary.karms-save-btn {
    background: #005bea !important;
    border: none !important;
    height: 48px !important;
    padding: 0 40px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    box-shadow: 0 4px 15px rgba(0, 91, 234, 0.2) !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-primary.karms-save-btn:hover {
    background: #0046b8 !important;
    box-shadow: 0 6px 20px rgba(0, 91, 234, 0.3) !important;
}

#karms_reset_btn {
    border-radius: 8px;
    color: #d63638;
    border-color: #d63638;
    background: transparent;
    padding: 0 20px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#karms_reset_btn:hover {
    background: #fcf2f2;
    color: #b32d2e;
    border-color: #b32d2e;
}

/* -----------------------------------------------------------------------------
 * 8. Responsive Adjustments
 * ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .karms-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .karms-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    body.rtl .karms-field-row {
        flex-direction: column;
    }

    .karms-field-label {
        flex: none;
        width: 100%;
    }

    .karms-submit-area {
        flex-direction: column;
        gap: 20px;
    }

    body.rtl .karms-submit-area {
        flex-direction: column;
    }
}
