/* Integration layer for IrisaFoundation components inside the Basa dashboard shell. */

.dashboard-layout {
    background: #f9f9fa;
}

.dashboard-layout,
.dashboard-layout * {
    letter-spacing: 0;
}

.dashboard-body #sidebar.sidebar {
    position: static !important;
    inset: auto !important;
    height: 100% !important;
    min-height: 0;
    padding: 12px 0 16px;
    background: #fff;
    border-left: 1px solid #d8dadd;
    box-shadow: none;
    z-index: 1;
    flex: 0 0 288px;
}

.dashboard-body #sidebar.sidebar[style*="68px"] {
    flex-basis: 68px;
}

.dashboard-body #sidebar .ps-3 {
    padding-inline: 8px !important;
}

.dashboard-body #sidebar a,
.dashboard-body #sidebar a:hover,
.dashboard-body #sidebar a:focus {
    text-decoration: none;
}

.dashboard-body #sidebar .link-bg-color {
    min-height: 40px;
    width: auto;
    margin: 2px 8px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #333a47;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
    font-size: 14px;
    line-height: 1.6;
    white-space: nowrap;
}

.dashboard-body #sidebar .link-bg-color > i,
.dashboard-body #sidebar .link-bg-color a > i {
    width: 20px;
    min-width: 20px;
    color: #8c919b;
    text-align: center;
}

.dashboard-body #sidebar .link-bg-color:hover,
.dashboard-body #sidebar .link-bg-color.sidebar-active-link,
.dashboard-body #sidebar .link-bg-color:hover a {
    color: #1b1464;
    background: #f0eff8;
    font-weight: 700 !important;
}

.dashboard-body #sidebar .link-bg-color:hover > i,
.dashboard-body #sidebar .link-bg-color.sidebar-active-link > i,
.dashboard-body #sidebar .link-bg-color:hover a > i {
    color: #1b1464;
}

.dashboard-body #sidebar .sub-link-sidebar {
    margin-inline-start: 16px !important;
    padding-inline-start: 0;
    padding-inline-end: 8px;
}

.dashboard-body #sidebar .favorite {
    display: none;
}

.dashboard-main .pagination,
.lov-modal .pagination {
    margin: 0;
    gap: 4px;
}

.dashboard-main .minimal-xs .page-item .page-link,
.lov-modal .minimal-xs .page-item .page-link {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 6px;
    border: 1px solid #d8dadd;
    background: #fff;
    color: #333a47;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

.dashboard-main .minimal-xs .page-item .page-link:hover,
.lov-modal .minimal-xs .page-item .page-link:hover {
    border-color: #1b1464;
    background: #f0eff8;
    color: #1b1464;
}

.dashboard-main .minimal-xs .page-item.active .page-link,
.lov-modal .minimal-xs .page-item.active .page-link {
    border-color: #1b1464;
    background: #1b1464;
    color: #fff;
}

.dashboard-main .minimal-xs .page-item.disabled .page-link,
.lov-modal .minimal-xs .page-item.disabled .page-link {
    color: #adb1b8;
    background: #f9f9fa;
    opacity: 1;
}

.dashboard-main .pageSize,
.lov-modal .pageSize {
    min-width: 64px;
    height: 30px !important;
    padding: 2px 28px 2px 8px !important;
    border-radius: 6px;
    border-color: #d8dadd;
    font-size: 12px;
}

[dir="rtl"] .dashboard-main .pageSize,
[dir="rtl"] .lov-modal .pageSize {
    padding: 2px 8px 2px 28px !important;
}

.dashboard-main .irisa-paginator,
.lov-modal .irisa-paginator,
.irisa-paginator {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 10px 16px;
    width: 100%;
    margin-inline: 0;
    padding: 10px 16px !important;
    border: 1px solid #e4e5e7;
    border-radius: 8px;
    background: #fff;
    color: #333a47;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
}

.dashboard-main .irisa-basic-paginator,
.lov-modal .irisa-basic-paginator,
.irisa-basic-paginator {
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
}

.irisa-paginator > * {
    width: auto !important;
    max-width: none !important;
    padding-inline: 0 !important;
}

.irisa-paginator__goto,
.irisa-paginator__size {
    display: flex !important;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0 !important;
    color: #59606c;
    font-size: 12px;
    line-height: 1.8;
    white-space: nowrap;
}

.irisa-paginator__goto {
    justify-content: flex-start !important;
    order: 0 !important;
}

.irisa-paginator__pages {
    display: flex !important;
    justify-content: center !important;
    min-width: 0;
    margin-block: 0 !important;
    order: 0 !important;
}

.irisa-paginator__size {
    justify-content: flex-end !important;
    order: 0 !important;
}

.irisa-paginator__page-input {
    width: 44px !important;
    min-width: 44px;
    height: 30px !important;
    margin-inline: 0 !important;
    padding: 0 4px !important;
    border: 1px solid #d8dadd;
    border-radius: 6px;
    color: #333a47;
    font-size: 12px;
    font-weight: 600;
    line-height: 30px;
    box-shadow: none;
}

.irisa-paginator__page-input:focus,
.irisa-paginator__page-size:focus {
    border-color: #1b1464;
    box-shadow: 0 0 0 2px rgba(27, 20, 100, 0.12);
}

.irisa-paginator__page-input:disabled,
.irisa-paginator__page-size:disabled {
    background: #f9f9fa;
    color: #8c919b;
    opacity: 1;
}

.irisa-paginator__page-size {
    margin-inline: 0 !important;
}

.irisa-paginator .pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 0;
    direction: rtl;
}

.irisa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.irisa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 26, 32, 0.44);
    backdrop-filter: blur(2px);
}

.irisa-modal-shell {
    position: relative;
    z-index: 1;
    overflow: hidden !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #333a47;
    direction: rtl;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22) !important;
}

.irisa-modal-content {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: 86vh;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.irisa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 14px 20px;
    border-bottom: 1px solid #e4e5e7;
    background: #fff;
}

.irisa-modal-title {
    margin: 0;
    color: #333a47;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
}

.irisa-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e4e5e7 !important;
    border-radius: 8px;
    background: #f9f9fa !important;
    color: #6a6f77;
    opacity: 1;
    box-shadow: none;
}

.irisa-modal-close:hover,
.irisa-modal-close:focus {
    border-color: #d8dadd !important;
    background: #f0eff8 !important;
    color: #1b1464;
}

.irisa-modal-body {
    min-height: 0;
    max-height: calc(86vh - 58px);
    padding: 20px 24px;
    overflow-y: auto;
}

.irisa-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #e4e5e7;
    background: #fff;
}

.irisa-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.mud-dialog {
    border-radius: 8px !important;
    direction: rtl;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
}

.mud-dialog .mud-dialog-content,
.mud-dialog .mud-dialog-actions {
    color: #333a47;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
}

.toast-container {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 2500 !important;
    display: grid;
    gap: 12px;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
}

.toast-container .toast-item {
    --toast-color: #1b1464;
    --toast-soft: #f0eff8;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 28px;
    position: relative;
    align-items: start;
    gap: 10px;
    width: 100%;
    min-height: 82px;
    padding: 14px 14px 16px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--toast-color) 28%, #d8dadd);
    border-radius: 8px;
    background: #fff;
    color: #333a47;
    direction: rtl;
    font-family: var(--font-admin, IRANYekan-regular, Tahoma, sans-serif);
    font-size: 13px;
    line-height: 1.8;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
    opacity: 1;
    pointer-events: auto;
}

.toast-container .toast-success {
    --toast-color: #218653;
    --toast-soft: #edf9f2;
}

.toast-container .toast-error {
    --toast-color: #d92d20;
    --toast-soft: #fff1f0;
}

.toast-container .toast-warning {
    --toast-color: #b7791f;
    --toast-soft: #fff8e6;
}

.toast-container .toast-info {
    --toast-color: #1b5fc1;
    --toast-soft: #eef5ff;
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--toast-soft);
    color: var(--toast-color);
    font-size: 15px;
}

.toast-content {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.toast-title {
    color: #333a47;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.toast-message {
    color: #59606c;
    overflow-wrap: anywhere;
}

.toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8c919b;
    pointer-events: auto;
}

.toast-close:hover,
.toast-close:focus {
    background: #f1f2f4;
    color: #333a47;
}

.toast-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--toast-color);
    transform-origin: right center;
    animation: toast-progress-shrink var(--toast-delay, 5000ms) linear forwards;
}

@keyframes toast-progress-shrink {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 960px) {
    .dashboard-body #sidebar.sidebar {
        width: 100% !important;
        height: auto !important;
        flex-basis: auto;
        border-left: 0;
        border-bottom: 1px solid #d8dadd;
    }

    .dashboard-body #sidebar .link-bg-color {
        margin-inline: 8px;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }

    .irisa-modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .irisa-modal-backdrop {
        cursor: default;
    }

    .irisa-modal-shell {
        max-width: 100% !important;
        width: 100% !important;
    }

    .irisa-modal-content {
        max-height: 90vh;
    }

    .irisa-modal-header,
    .irisa-modal-body,
    .irisa-modal-footer {
        padding-inline: 16px;
    }

    .dashboard-main .irisa-paginator,
    .lov-modal .irisa-paginator,
    .irisa-paginator,
    .dashboard-main .irisa-basic-paginator,
    .lov-modal .irisa-basic-paginator,
    .irisa-basic-paginator {
        grid-template-columns: 1fr;
        padding: 12px !important;
    }

    .irisa-paginator__goto,
    .irisa-paginator__pages,
    .irisa-paginator__size {
        justify-content: center !important;
    }

    .irisa-paginator__goto,
    .irisa-paginator__size {
        flex-wrap: wrap;
        white-space: normal;
    }
}
