@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Lateef:wght@200;300;400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400..700&family=Scheherazade+New:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'LPMQ';
    src: url('../font/LPMQ.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Main Container */
.ngarab-settings-wrap {
    max-width: 1000px;
    margin: 20px 20px 20px 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header Section */
.ngarab-header {
    background: #000;
    color: #fff;
    padding: 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ngarab-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ngarab-logo-wrap {
    background: #fff;
    color: #000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.ngarab-branding h1 {
    color: #fff;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ngarab-version {
    background: #FFD21E;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* Layout Grid */
.ngarab-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Card Style */
.ngarab-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.ngarab-card h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #F1F1F1;
    padding-bottom: 15px;
}

/* Form Styling */
.ngarab-settings-table th {
    width: 200px;
    text-align: left;
    padding: 20px 0 !important;
    font-weight: 500;
}

.ngarab-settings-table td {
    padding: 20px 0 !important;
}

.ngarab-settings-table select,
.ngarab-settings-table input[type="number"] {
    width: 100%;
    max-width: 300px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0 12px;
}

/* Preview Box */
.ngarab-preview-container {
    margin-top: 15px;
}

.ngarab-preview-box {
    margin-top: 10px;
    padding: 40px;
    background: #F9F9F9;
    border: 1px dashed #DDD;
    border-radius: 8px;
    text-align: right;
    direction: rtl;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ngarab-preview-box:hover {
    background: #FFF;
    border-color: #000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

#ngarab-settings-preview {
    font-size: 40pt;
    line-height: 1.4;
    color: #1d2327;
}

.ngarab-preview-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Sidebar Sections */
.ngarab-sidebar-section {
    margin-bottom: 30px;
}

.ngarab-sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #000;
    font-weight: 700;
}

.ngarab-info-pill {
    background: #F0F0F1;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #50575e;
}

.ngarab-info-pill code {
    background: rgba(0,0,0,0.05);
    padding: 2px 5px;
    border-radius: 4px;
}

/* Credits Section */
.ngarab-credits {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #EEE;
    margin-top: 20px;
}

.ngarab-author-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d2327;
    font-weight: 600;
}

.ngarab-author-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.ngarab-author-row {
    margin-bottom: 15px;
}

.ngarab-contact-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid rgba(0,0,0,0.03);
    padding-top: 15px;
}

.ngarab-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f0f0f1;
    border-radius: 50%;
    color: #50575e !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ngarab-contact-link:hover {
    background: #000;
    color: #fff !important;
    transform: scale(1.1);
}

.ngarab-contact-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Submit Section */
.ngarab-submit-wrap {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #EEE;
}

.ngarab-submit-wrap .button-primary {
    height: 46px !important;
    padding: 0 30px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    background: #000 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    transition: transform 0.2s !important;
}

.ngarab-submit-wrap .button-primary:hover {
    transform: translateY(-2px);
    background: #222 !important;
}

/* Responsive */
@media (max-width: 850px) {
    .ngarab-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Switch Component */
.ngarab-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.ngarab-switch input {
    display: none;
}

.ngarab-switch::before {
    content: "";
    width: 44px;
    height: 22px;
    background: #E4E4E4;
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.ngarab-switch::after {
    content: "";
    width: 16px;
    height: 16px;
    background: #FFF;
    border-radius: 50%;
    position: absolute;
    transform: translateX(3px);
    transition: all 0.3s ease;
}

.ngarab-switch:has(input:checked)::before {
    background: #000;
}

.ngarab-switch:has(input:checked)::after {
    transform: translateX(25px);
}

.ngarab-switch-label {
    font-size: 14px;
    color: #50575e;
}

/* TinyMCE RTL Support */
.mce-ngarab-rtl-textarea textarea,
textarea.mce-ngarab-rtl-field,
textarea.ngarab-rtl-field,
.mce-ngarab-rtl-field,
.ngarab-rtl-field {
    direction: rtl !important;
    text-align: right !important;
    /* unicode-bidi: plaintext !important; */
    font-size: 22px !important;
    font-family: "Scheherazade New", "LPMQ", "Amiri", serif !important;
    line-height: 1.5 !important;
}
