:root {
    --grid-alternate-row-color: #4e4f53;
    --grid-hover-row-color: #ff6a00;
}

html, body {
    height: 100%;
}

.LogonItemClassCSS {
    color: white !important;
}

app {
    display: block;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('../images/Logo.svg');
    mask: url('../images/Logo.svg');
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    width: 180px;
    height: 24px;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}



/*Kendin Yönet Extra*/

/*Grid Alternate row color */
.alt-item td {
    background-color: var(--grid-alternate-row-color);
    
}

/*.alt-item {
    background-color: var(--grid-alternate-row-color);
}

    .alt-item > td {
        --dxbl-grid-bg: var(--grid-alternate-row-color);

    }*/

/*
    Grid Show Selection Total
*/
.grid-calc-tutar {
    font-weight: bolder;
    padding: 5px;
    background-color: var(--bs-primary);
    color: white;
}

.siteSecimClass {
    padding-left: 20px;
}

    .siteSecimClass .dxbl-edit-btn-clear {
        display: none !important;
    }

.myxaf-actionNoBorder {
    border-width: 0 !important;
    border: 0 !important;
}

/*.dxbl-btn {
    border: 0px !important;
}*/

.xaf-inline-action-template {
    justify-content: left;
}

.detail-view-action {
    background-color: var(--bs-primary);
    color: var(--dxbl-btn-color);
    font-size: large !important;
    width: 200px !important;
    height: 50px !important;
    /*border-radius: 10px !important;*/
}

/*.theme-blazing-berry.detail-view-action {
    color: red !important;
}*/

/*.theme-office-white.detail-view-action {
    color: white !important;
}*/

/*
    Font Color Yeşil: 55bb55  rgb(85, 187, 85)
    Back Color Yeşil: bbffbb  rgb(187, 255, 187)

    Back Color Bakiye Cyan: 55aaaa   rgb(85, 170, 170)

    Font Color Kırmızı: ee55555  rgb(238, 85, 85)
*/

/*
    Clear Menu Underline
*/
.xaf-navmenu a .xaf-nav-link {
    text-decoration: revert !important;
}

.dxbl-grid-command-cell .dxbl-btn-link > span {
    text-decoration: revert !important;
}

.captionBold {
    font-weight: bold;
}


.dxbl-grid > .dxbl-grid-toolbar-container {
    height: 2.2rem !important;
    padding: 0.5rem !important;
}


/*Root ListView'lerin ekranı kaplaması için*/
/*.dxbl-grid {
    height: 100%
}*/

/* Toast Mesajlarda /r/n (Environment.Newline) farklı satırlarda gösterilmesi için */
.xaf-alert-message {
    white-space: pre-line !important;
}

/*.myCustomGridWidthClass {
    width: min-content;
}*/

/*.dxbl-grid tbody tr:hover {
    background-color: color-mix(in srgb, var(--grid-hover-row-color) 30%, white 30%) !important;*/
    /*background-color: var(--grid-hover-row-color) !important;*/
    /*transition: background-color 0.3s ease;*/
    /*color: var(--bs-secondary-color) !important;*/
    /*color: white;*/
    /*filter: brightness(20%);*/
/*}*/

/*.dxbl-grid-selected-row {
    background-color: color-mix(in srgb, var(--grid-hover-row-color) 50%, white 70%) !important;
}*/
/*.dxbl-grid-header-row {
    background-color: color-mix(in srgb, var(--grid-hover-row-color) 40%, black 20%) !important;
    color: var(--bs-secondary-color) !important;
}*/
.pe-pdf-viewer .dxbrv-toolbar {
    height: 2rem;
}
.pe-pdf-viewer {
    width: 100%;
    height: 100vh;
}

.dxbl-pivot-table {
    height: inherit;
}

.xaf-chat-history .xaf-msg {
    max-width: 90%;
    padding: 8px 10px;
    border-radius: 10px;
    margin: 6px 0;
    box-shadow: 0 2px 6px -2px rgba(0,0,0,.3);
}

    .xaf-chat-history .xaf-msg.user {
        align-self: flex-end;
        background: #fff;
    }

    .xaf-chat-history .xaf-msg.assistant {
        align-self: flex-start;
        background: rgba(0,0,0,.04);
    }

.xaf-chat-history .xaf-msg-content {
    white-space: pre-wrap;
}

.xaf-chat-history .xaf-msg-meta {
    font-size: 11px;
    opacity: .6;
    text-align: right;
    margin-top: 4px;
}

.dxbrv-wrapper.dxbrv-scrollbar-color {
    height: 90vh !important;
}
/* Dış layout – PropertyEditor içindeyken yatayda olabildiğince yayılsın */
.dia-chat-layout {
    width: 100%;
    padding: 8px 0 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Ana kabuk – XAF temasına uyumlu kart */
.dia-chat-shell {
    width: 100%;
    max-width: 100%; /* PropertyEditor ne verirse o */
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 40px -28px rgba(15, 23, 42, 0.6);
    padding: 8px 10px 6px;
    box-sizing: border-box;
}

/* Üst başlık */
.dia-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 4px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    margin-bottom: 4px;
}

.dia-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #a855f7); /* mor degrade */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f3ff;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 18px -12px rgba(88, 28, 135, 0.9);
}

.dia-chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dia-chat-title {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--dxbs-body-color, #0f172a);
}

.dia-chat-subtitle {
    font-size: 0.78rem;
    color: var(--dxbs-secondary, #64748b);
}

/* DxAIChat alanı – dikey scroll'u kendi yönetiyor */
.dia-chat {
    width: 100%;
    height: 460px; /* yüksekliği sen istersen oynarsın */
}

    /* Ortak balon kabuğu */
    .dia-chat .dia-chat-message {
        max-width: 80%;
        padding: 8px 10px;
        border-radius: 12px;
        margin: 4px 0;
        box-shadow: 0 2px 6px -3px rgba(15, 23, 42, 0.4);
        word-wrap: break-word;
    }

        /* ASSISTANT – mor tonlar */
        .dia-chat .dia-chat-message.dia-assistant-message {
            background-color: rgba(147, 51, 234, 0.12); /* #9333ea */
            border: 1px solid rgba(147, 51, 234, 0.55);
            color: var(--dxbs-body-color, #0f172a);
            align-self: flex-start;
        }

        /* USER – nötr / tema uyumlu */
        .dia-chat .dia-chat-message.dia-user-message {
            background-color: rgba(255, 255, 255, 0.96);
            border: 1px solid rgba(148, 163, 184, 0.6);
            color: var(--dxbs-body-color, #0f172a);
            align-self: flex-end;
        }

        /* ERROR – kırmızı ton */
        .dia-chat .dia-chat-message.dia-error-message {
            background-color: rgba(248, 113, 113, 0.15);
            border: 1px solid rgba(248, 113, 113, 0.7);
            color: var(--dxbs-body-color, #0f172a);
            align-self: center;
        }

/* Markdown içeriği */
.dia-message-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dxbs-body-color, #0f172a);
}

    .dia-message-content h1,
    .dia-message-content h2,
    .dia-message-content h3 {
        margin-top: 0.3rem;
        margin-bottom: 0.2rem;
        font-weight: 600;
        color: var(--dxbs-body-color, #0f172a);
    }

    .dia-message-content h3 {
        font-size: 0.95rem;
        border-left: 3px solid #7c3aed;
        padding-left: 6px;
    }

    .dia-message-content p {
        margin: 0.2rem 0;
    }

    .dia-message-content ul {
        margin: 0.2rem 0 0.2rem 1.1rem;
        padding-left: 0;
    }

    .dia-message-content li {
        margin-bottom: 2px;
    }

    .dia-message-content code {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 0.8rem;
        background-color: rgba(148, 163, 184, 0.3);
        padding: 1px 4px;
        border-radius: 4px;
    }

/* EmptyMessageAreaTemplate */
.dia-empty {
    display: grid;
    grid-template-columns: minmax(0, 110px) minmax(0, 1fr);
    gap: 14px;
    padding: 14px 8px 8px;
    align-items: flex-start;
}

.dia-empty-left {
    display: flex;
    justify-content: center;
}

.dia-empty-avatar-big {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: radial-gradient(circle at 10% 10%, #a855f7, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f3ff;
    font-weight: 800;
    font-size: 1.7rem;
    box-shadow: 0 20px 38px -20px rgba(88, 28, 135, 0.95);
}

.dia-empty-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dia-empty-greeting {
    font-size: 0.9rem;
    color: var(--dxbs-body-color, #0f172a);
}

.dia-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dxbs-body-color, #0f172a);
}

.dia-empty-text {
    font-size: 0.88rem;
    color: var(--dxbs-secondary, #475569);
    line-height: 1.4;
}

.dia-empty-footer {
    margin-top: 8px;
    font-size: 0.84rem;
    color: var(--dxbs-secondary, #64748b);
}

/* Mobile */
@media (max-width: 768px) {
    .dia-chat-shell {
        padding: 6px 6px 4px;
    }

    .dia-empty {
        grid-template-columns: 1fr;
    }

    .dia-empty-left {
        justify-content: flex-start;
    }

    .dia-chat .dia-chat-message {
        max-width: 100%;
    }
}
