/* ============================================================
   Elanlar v4.6.1 — QA UI Fix Pack
   Targeted fixes after live installation review.
   ============================================================ */

/* ---- Dashboard tabs: always one row + scroll ---- */
.elanlar-app .elan-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
    padding:2px 0 6px!important;
    margin-bottom:14px!important;
}
.elanlar-app .elan-tabs::-webkit-scrollbar{display:none!important}
.elanlar-app .elan-tab{
    flex:0 0 auto!important;
    white-space:nowrap!important;
}

/* ---- Messages tab in dashboard: remove the outer extra block ---- */
.elanlar-app .elan-table-wrap--messages{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    border-radius:0!important;
    overflow:visible!important;
    padding:0!important;
}

/* ---- Messenger: single clean card instead of block in block ---- */
.elanlar-app .elan-messenger{
    border:1px solid #dbe6f2!important;
    border-radius:18px!important;
    overflow:hidden!important;
    box-shadow:none!important;
    background:#fff!important;
}
.elanlar-app .elan-messenger>.elan-messenger__header,
.elanlar-app .elan-inbox-search-wrap,
.elanlar-app .elan-conv-list{
    border-left:0!important;
    border-right:0!important;
}
.elanlar-app .elan-messenger>.elan-messenger__header{
    border-top:0!important;
    border-radius:0!important;
}
.elanlar-app .elan-conv-list{
    border-bottom:0!important;
    border-radius:0!important;
}

/* ---- Compact Reklam Et button ---- */
.elanlar-app .elan-promote-btn,
.elanlar-app .elan-btn.elan-btn--promote{
    min-height:34px!important;
    padding:0 12px!important;
    border-radius:999px!important;
    font-size:11px!important;
    line-height:1!important;
    gap:6px!important;
    box-shadow:0 8px 20px rgba(0,103,237,.14)!important;
}
.elanlar-app .elan-promote-btn svg{width:13px!important;height:13px!important}

/* Better package modal fit */
#elan-promote-modal .elan-modal__box{
    width:min(720px,calc(100vw - 24px))!important;
    max-height:min(90vh,860px)!important;
    overflow:auto!important;
}
#elan-promote-modal .elan-packages-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
    gap:12px!important;
}
#elan-promote-modal .elan-pkg-card{
    min-width:0!important;
    height:100%!important;
}

/* ---- Listing table polish ---- */
.elanlar-app .elan-actions{display:inline-flex!important;align-items:center!important;gap:4px!important;flex-wrap:wrap!important}
@media (max-width: 767px){
    .elanlar-app .elan-promote-btn,
    .elanlar-app .elan-btn.elan-btn--promote{
        min-height:32px!important;
        padding:0 10px!important;
        font-size:10.5px!important;
    }
    .elanlar-app .elan-table.elan-table--mobile-cards td[data-label="Reklam"] .elan-promote-btn{
        width:auto!important;
        max-width:100%!important;
    }
}

/* ---- Wizard category cards ---- */
.elan-create-listing .elan-cat-option__check{display:none!important}
.elan-create-listing .elan-cat-option{padding-right:12px!important}
.elan-create-listing .elan-cat-option.selected,
.elan-create-listing .elan-cat-option[aria-pressed="true"]{
    border-color:#0067ed!important;
    background:#edf5ff!important;
    box-shadow:0 0 0 1px rgba(0,103,237,.06)!important;
}

/* ---- Wizard step completion: green + white check ---- */
.elan-create-listing .elan-step.completed{color:#16a34a!important}
.elan-create-listing .elan-step.completed .elan-step__icon{
    border-color:#16a34a!important;
    background:#16a34a!important;
    color:#fff!important;
    box-shadow:0 6px 16px rgba(22,163,74,.18)!important;
}
.elan-create-listing .elan-step.completed .elan-step__icon-check{display:block!important;color:#fff!important}
.elan-create-listing .elan-step-connector.completed .elan-step-connector__line,
.elan-create-listing .elan-step-connector.half .elan-step-connector__line--left,
.elan-create-listing .elan-progress__fill[data-status="complete"]{
    background:#16a34a!important;
}

/* Keep current active step brand blue */
.elan-create-listing .elan-step.active .elan-step__icon{
    background:#0067ed!important;
    border-color:#0067ed!important;
}

/* ---- Dəyişdir link clean ---- */
.elan-create-listing .elan-btn-text,
.elan-create-listing .elan-summary-edit,
.elan-create-listing .elan-summary-inline-edit{
    padding:0!important;
    border:0!important;
    outline:none!important;
    background:transparent!important;
    box-shadow:none!important;
    text-decoration:none!important;
}
.elan-create-listing .elan-btn-text:focus,
.elan-create-listing .elan-btn-text:focus-visible{
    outline:none!important;
    box-shadow:none!important;
}

/* ---- Elan açıqlaması: remove block-in-block feel ---- */
.elan-create-listing .elan-editor{
    border:1px solid #d8e3ef!important;
    border-radius:14px!important;
    background:#fff!important;
    overflow:hidden!important;
}
.elan-create-listing .elan-editor__toolbar{
    background:#fff!important;
    border-bottom:1px solid #edf2f7!important;
    padding:8px 10px 6px!important;
}
.elan-create-listing .elan-editor__content,
.elan-create-listing [contenteditable="true"].elan-editor__content{
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    padding:12px 13px 14px!important;
}

/* ---- Chat: no back button, no warning X, lift composer ---- */
.elanlar-app .elan-chat-back,
.elanlar-app .elan-chat-safety-ticker__close,
.elanlar-app .elan-chat-keyhint{display:none!important}
.elanlar-app .elan-chat-composer-meta{
    min-height:4px!important;
    padding:0!important;
}
.elanlar-app .elan-chat-footer{
    margin-top:8px!important;
}
body.elan-chat-shell .elanlar-app .elan-chat-footer{
    margin:8px 10px 10px!important;
    border:1px solid var(--em-line)!important;
    border-radius:14px!important;
    padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important;
}
body.elan-chat-shell .elanlar-app .elan-chat-body{
    padding-bottom:4px!important;
}

/* ---- Safety ticker without close button should align cleanly ---- */
.elanlar-app .elan-chat-safety-ticker{
    padding-right:12px!important;
}

/* ---- Mobile refinements ---- */
@media (max-width: 767px){
    .elanlar-app .elan-tabs{gap:6px!important;margin-bottom:10px!important;padding-bottom:4px!important}
    .elanlar-app .elan-tab{font-size:12px!important;padding:10px 12px!important}
    .elan-create-listing .elan-step.completed .elan-step__icon,
    .elan-create-listing .elan-step.active .elan-step__icon,
    .elan-create-listing .elan-step__icon{
        width:32px!important;height:32px!important;flex-basis:32px!important;
    }
    .elan-create-listing .elan-step__label{font-size:10px!important}
    .elan-create-listing .elan-subcat-head{
        gap:10px!important;
    }
    .elan-create-listing .elan-editor__toolbar{gap:3px!important;overflow-x:auto!important;scrollbar-width:none!important}
    .elan-create-listing .elan-editor__toolbar::-webkit-scrollbar{display:none!important}
    body.elan-chat-shell .elanlar-app .elan-chat-footer{
        margin:6px 8px 8px!important;
        padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;
    }
}
