/* =========================================
   DBS Shortcodes & Components Stylesheet
   ========================================= */

:root {
    --dbs-color-primary: #0073aa;
    --dbs-color-secondary: #6c757d;
    --dbs-color-success: #28a745;
    --dbs-color-warning: #ffc107;
    --dbs-color-error: #dc3545;
    --dbs-color-info: #17a2b8;
    --dbs-color-tip: #8b5cf6;
    --dbs-color-action: #f97316;
    --dbs-color-dark: #343a40;
    --dbs-color-cta-bg: #f8f9fa;
    --dbs-color-cta-btn: #ff3366;

    /* Prompt Box Variables */
    --dbs-prompt-bg: #1e1e2f;
    --dbs-prompt-header-bg: #2a2a40;
    --dbs-prompt-border: #3f3f5a;
    --dbs-prompt-text: #e2e8f0;
    --dbs-prompt-accent: #a5b4fc;
}

/* Base Box Styles */
.dbs-box {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-right: 4px solid #ccc;
    direction: rtl;
    line-height: 1.8;
}

.dbs-box-title {
    font-weight: 800;
    font-size: 1.1em;
    margin-bottom: 0.75em;
    display: flex;
    align-items: center;
}

.dbs-box-content p:last-child {
    margin-bottom: 0;
}

/* Specific Box Colors */
.dbs-box-primary { border-right-color: var(--dbs-color-primary); }
.dbs-box-primary .dbs-box-title { color: var(--dbs-color-primary); }

.dbs-box-secondary { border-right-color: var(--dbs-color-secondary); }
.dbs-box-secondary .dbs-box-title { color: var(--dbs-color-secondary); }

.dbs-box-success { border-right-color: var(--dbs-color-success); background: #f0fdf4; }
.dbs-box-success .dbs-box-title { color: var(--dbs-color-success); }

.dbs-box-warning { border-right-color: var(--dbs-color-warning); background: #fffbeb; }
.dbs-box-warning .dbs-box-title { color: var(--dbs-color-warning); }

.dbs-box-error { border-right-color: var(--dbs-color-error); background: #fef2f2; }
.dbs-box-error .dbs-box-title { color: var(--dbs-color-error); }

.dbs-box-info { border-right-color: var(--dbs-color-info); background: #f0f9ff; }
.dbs-box-info .dbs-box-title { color: var(--dbs-color-info); }

.dbs-box-tip { border-right-color: var(--dbs-color-tip); background: #faf5ff; }
.dbs-box-tip .dbs-box-title { color: var(--dbs-color-tip); }

.dbs-box-action { border-right-color: var(--dbs-color-action); background: #fff7ed; }
.dbs-box-action .dbs-box-title { color: var(--dbs-color-action); }

/* =========================================
   Prompt / Code Box Styles
   ========================================= */
.dbs-prompt-box {
    margin: 1.5em 0;
    background: var(--dbs-prompt-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    direction: ltr;
    text-align: left;
}

.dbs-prompt-header {
    background: var(--dbs-prompt-header-bg);
    padding: 10px 16px;
    border-bottom: 1px solid var(--dbs-prompt-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dbs-prompt-header-title {
    color: var(--dbs-prompt-accent);
    font-family: monospace;
    font-size: 0.9em;
}

.dbs-prompt-body {
    margin: 0;
    padding: 16px;
    color: var(--dbs-prompt-text);
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-prompt-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.copy-prompt-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* =========================================
   Call To Action Box (CTA)
   ========================================= */
/* =========================================
   Call To Action (CTA) Box - SaaS Style
========================================= */
.dbs-box-cta {
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-50) 100%);
    border: 1px solid var(--brand-200);
    border-right: 4px solid var(--brand-500); /* خط رنگی تاکید در سمت راست */
    margin: 2.5em 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(109, 92, 246, 0.15);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    direction: rtl;
}

.dbs-box-cta:hover {
    box-shadow: 0 15px 35px -10px rgba(109, 92, 246, 0.25);
    border-color: var(--brand-300);
}

.dbs-cta-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 2em;
}

.dbs-cta-content {
    flex: 1;
}

.dbs-cta-title {
    margin: 0 0 12px 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-900);
}

.dbs-cta-desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563; /* رنگ خاکستری ملایم برای خوانایی بهتر */
}

/* استایل دکمه دراپ‌دار (SaaS Button) */
.dbs-cta-action {
    display: flex;
    align-items: center;
}

.dbs-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--brand-500);
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 12px; /* انحنای مدرن به جای حالت بیضی قدیمی */
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px -6px rgba(109, 92, 246, 0.6);
    text-align: center;
    line-height: 1.5;
}

.dbs-cta-btn i {
    transition: transform 0.3s ease;
}

.dbs-cta-btn:hover {
    transform: translateY(-3px);
    background: var(--brand-600);
    box-shadow: 0 12px 25px -6px rgba(109, 92, 246, 0.7);
}

.dbs-cta-btn:hover i {
    transform: translateX(-5px); /* حرکت آیکون فلش به سمت چپ در هاور */
}

/* =========================================
   Responsive Layout
========================================= */
@media (min-width: 768px) {
    .dbs-cta-inner {
        flex-direction: row; /* در دسکتاپ دکمه و متن روبه‌روی هم قرار می‌گیرند */
        align-items: center;
        justify-content: space-between;
        padding: 2.5em;
    }

    .dbs-cta-btn {
        white-space: nowrap; /* جلوگیری از شکستن متن دکمه در دسکتاپ */
        flex-shrink: 0;
    }
}


/* =========================================
   Quote Box
   ========================================= */
.dbs-box-quote {
    margin: 1.5em 0;
    padding: 1.5em 2em;
    border-radius: 8px;
    border-right: 4px solid var(--dbs-color-primary);
    background: #f8f9fa;
    position: relative;
    z-index: 1;
}

.dbs-box-quote::before {
    content: "\f10e"; /* FontAwesome Quote Right */
    font-weight: 900;
    font-size: 3em;
    color: rgba(0, 115, 170, 0.05);
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: -1;
}

.dbs-quote-content {
    font-style: italic;
    font-size: 1.1em;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.8;
}

.dbs-quote-author {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--dbs-color-primary);
}

/* =========================================
   Glossary Nested System
   ========================================= */
.dbs-box-glossary-wrapper {
    padding: 1.5em;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.dbs-glossary-header {
    font-weight: 800;
    font-size: 1.2em;
    margin-bottom: 15px;
    color: var(--dbs-color-dark);
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.dbs-glossary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dbs-glossary-item {
    line-height: 1.8;
    font-size: 0.95em;
}

.dbs-glossary-term {
    font-weight: bold;
    color: var(--dbs-color-primary);
    margin-left: 6px;
}
.dbs-glossary-term::after { content: ":"; color: #333; }
.dbs-glossary-desc { color: #555; }

/* =========================================
   Pros & Cons Box
   ========================================= */
.dbs-box-pros-cons {
    border-radius: 8px;
    border: 1px solid #eaeaea;
    overflow: hidden;
}

.dbs-pc-grid { display: flex; flex-direction: column; }
.dbs-pc-col { padding: 1.5em; flex: 1; }
.dbs-pc-pros { background: #f0fdf4; border-bottom: 1px solid #eaeaea; }
.dbs-pc-cons { background: #fef2f2; }

.dbs-pc-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* =========================================
   FAQ System
   ========================================= */
.dbs-faq-container { display: flex; flex-direction: column; gap: 10px; }
.dbs-faq-item {
    border: 1px solid #eaeaea;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.dbs-faq-question {
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    background: #f8f9fa;
    list-style: none;
    user-select: none;
    margin: 0;
}
.dbs-faq-question::-webkit-details-marker { display: none; } /* Hide default arrow */
.dbs-faq-item[open] .dbs-faq-question {
    background: var(--dbs-color-primary);
    color: #fff;
}
.dbs-faq-item[open] .dbs-faq-question i { color: #fff !important; }
.dbs-faq-answer {
    padding: 15px;
    border-top: 1px solid #eaeaea;
    line-height: 1.8;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (min-width: 768px) {
    .dbs-cta-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .dbs-pc-grid { flex-direction: row; }
    .dbs-pc-pros { border-bottom: none; border-left: 1px solid #eaeaea; }
}
