﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* فونت فارسی مناسب */


.custom-table {
 
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    background-color: white;
    font-size: 0.875rem; /* کمی کوچکتر از Bootstrap (معادل ~table-sm) */
    direction: rtl; /* اگر داده‌ها فارسی هستند */
}

    .custom-table thead {
        background: linear-gradient(90deg, #e3f2fd, #bbdefb);
        color: #0d47a1;
        font-weight: bold;
    }

        .custom-table thead th {
            padding: 12px 16px;
            text-align: center;
            border-bottom: 1px solid #ddd;
            font-size: 0.9rem;
        }

    .custom-table tbody td {
        padding: 10px 14px;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        color: #333;
    }

    .custom-table tbody tr:hover {
        background-color: #f9f9f9;
        transition: background 0.2s ease-in-out;
    }

@media (max-width: 768px) {
    .custom-table {
        font-size: 0.8rem;
    }

        .custom-table thead th,
        .custom-table tbody td {
            padding: 8px 10px;
        }
}
html, body {
    height: 100%;
    overflow: hidden; /* جلوی اسکرول کل صفحه گرفته میشه */
}

#layoutSidenav {
    display: flex;
    height: 100%;
}

#layoutSidenav_nav {
    width: 15rem; /* عرض سایدبار */
    flex-shrink: 0;
    height: 100vh; /* کل ارتفاع ویوپورت */
    overflow-y: auto; /* فقط سایدبار اسکرول داشته باشه */
    background-color: #ffffff; /* رنگ پس‌زمینه */
    position: fixed; /* ثابت نگه داشتن سایدبار */
    top: 0;
    left: 0;
    z-index: 100; /* بالاتر از محتوای اصلی */
    /* سایه سمت راست سایدبار */
    box-shadow: 4px 0 12px -2px rgba(0, 0, 0, 0.25);
}

#layoutSidenav_content {
    flex-grow: 1;
    overflow-y: auto; /* محتوای اصلی هم اگه زیاد شد اسکرول بخوره */
    padding: 1rem;
}
.blocking-tree ul {
    list-style-type: none;
    padding-left: 20px;
}

.blocking-tree li {
    margin: 6px 0;
}

.tree-node {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

.blocker {
    background-color: #dc3545;
    color: white;
}

.blocked {
    background-color: #ffc107;
}

.normal {
    background-color: #28a745;
    color: white;
}

/* استایل درختی برای Blocking Tree */
.blocking-tree-wrapper ul {
    padding-top: 10px;
    position: relative;
    transition: all 0.5s;
    list-style-type: none;
    padding-right: 0;
}

.blocking-tree-wrapper li {
    float: right;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 10px 5px 0 5px;
    transition: all 0.5s;
}
    /* خطوط اتصال */
    .blocking-tree-wrapper li::before, .blocking-tree-wrapper li::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        border-top: 1px solid #ccc;
        width: 50%;
        height: 10px;
    }

    .blocking-tree-wrapper li::after {
        right: 50%;
        left: auto;
        border-right: 1px solid #ccc;
    }

    .blocking-tree-wrapper li:only-child::after, .blocking-tree-wrapper li:only-child::before {
        display: none;
    }

    .blocking-tree-wrapper li:only-child {
        padding-top: 0;
    }

    .blocking-tree-wrapper li:first-child::after, .blocking-tree-wrapper li:last-child::before {
        border: 0 none;
    }

    .blocking-tree-wrapper li:last-child::after {
        border-right: 1px solid #ccc;
        border-radius: 0 5px 0 0;
    }

    .blocking-tree-wrapper li:first-child::before {
        border-radius: 5px 0 0 0;
    }

.blocking-tree-wrapper ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 1px solid #ccc;
    width: 0;
    height: 10px;
}
/* باکس‌های نود */
.tree-node-item {
    border: 1px solid #ccc;
    padding: 8px 15px;
    text-decoration: none;
    color: #666;
    font-family: arial, verdana, tahoma;
    font-size: 12px;
    display: inline-block;
    border-radius: 5px;
    transition: all 0.5s;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.node-root {
    border: 2px solid #2e7d32;
    background: #e8f5e9;
}

.node-blocker {
    border: 2px solid #f57c00;
    background: #fff3e0;
}

.node-blocked {
    border: 2px solid #d32f2f;
    background: #ffebee;
}

.tree-node-item:hover {
    background: #eee;
    border: 1px solid #94a0b4;
}

