/* Fereastra "Aspect" (XF\Ui\ThemeAspect, theme-aspect.js). Independenta de tema: valori fixe, prefix tasp-
   (nu "xfa-": orice clasa care contine "fa-" e prinsa de [class*="fa-"] din Font Awesome / ace.min.css). */
.tasp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 18, 30, .45);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.tasp-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    background: #fff;
    color: #2b3245;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}
.tasp-head, .tasp-foot {
    display: flex;
    align-items: center;
    padding: 14px 20px;
}
.tasp-head {
    justify-content: space-between;
    border-bottom: 1px solid #e7e8ec;
}
.tasp-head h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1f2433;
}
.tasp-close {
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
}
.tasp-body {
    padding: 4px 20px 16px;
    overflow-y: auto;
}
.tasp-label {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b7280;
}
.tasp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.tasp-card {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 1px solid #d9dce3;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.tasp-card:hover {
    border-color: #9aa3b5;
}
.tasp-card.tasp-selected {
    border-color: #2b3245;
    box-shadow: 0 0 0 1px #2b3245;
}
.tasp-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tasp-card-text strong {
    font-weight: 600;
    color: #1f2433;
}
.tasp-card-text em {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #e8f5ec;
    color: #15803d;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}
.tasp-card-text small {
    color: #5b6478;
    font-size: 12px;
}
.tasp-old {
    margin-top: 12px;
}
.tasp-old summary {
    cursor: pointer;
    color: #4b5468;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Miniaturi */
.tasp-thumb {
    position: relative;
    flex: 0 0 96px;
    height: 64px;
    border: 1px solid #d9dce3;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}
.tasp-thumb i {
    position: absolute;
    display: block;
}
.tasp-t-side {
    left: 0;
    top: 0;
    bottom: 0;
    width: 22px;
    background: #f3f4f7;
    border-right: 1px solid #e4e6eb;
}
.tasp-t-top {
    left: 22px;
    right: 0;
    top: 0;
    height: 10px;
    background: #fff;
    border-bottom: 1px solid #e4e6eb;
}
.tasp-t-body {
    left: 28px;
    right: 6px;
    top: 16px;
    bottom: 4px;
}
.tasp-t-body b {
    display: block;
    height: 4px;
    margin-bottom: 5px;
    border-radius: 2px;
    background: #dfe2e8;
}
.tasp-t-body b:first-child {
    width: 55%;
    background: #9aa3b5;
}
.tasp-t-body u {
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 22px;
    height: 8px;
    border-radius: 2px;
    background: var(--tasp-accent);
}
.tasp-thumb-modern .tasp-t-side::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 18px;
    height: 4px;
    border-radius: 2px;
    background: var(--tasp-accent);
    opacity: .6;
}
.tasp-thumb-sidebar-dark .tasp-t-side {
    background: #222d32;
    border-right-color: #222d32;
}
.tasp-thumb-sidebar-dark .tasp-t-top {
    background: #3c8dbc;
    border-bottom-color: #3c8dbc;
}
.tasp-thumb-top .tasp-t-side {
    display: none;
}
.tasp-thumb-top .tasp-t-top {
    left: 0;
    height: 12px;
    background: #3c8dbc;
    border-bottom-color: #3c8dbc;
}
.tasp-thumb-top .tasp-t-body {
    left: 6px;
}
/* Modern cu meniul sus: bara deschisa, linia de meniu in culoarea aleasa */
.tasp-thumb-modern-top .tasp-t-side {
    display: none;
}
.tasp-thumb-modern-top .tasp-t-top {
    left: 0;
    height: 12px;
}
.tasp-thumb-modern-top .tasp-t-top::after {
    content: "";
    position: absolute;
    left: 24px;
    top: 4px;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--tasp-accent);
    opacity: .6;
}
.tasp-thumb-modern-top .tasp-t-body {
    left: 6px;
}
.tasp-thumb-darkmode {
    background: #1a1d2e;
    border-color: #3a3d55;
}
.tasp-thumb-darkmode .tasp-t-side {
    background: #111322;
    border-right-color: #2a2d42;
}
.tasp-thumb-darkmode .tasp-t-top {
    background: #1a1d2e;
    border-bottom-color: #2a2d42;
}
.tasp-thumb-darkmode .tasp-t-body b {
    background: #33374f;
}
.tasp-thumb-darkmode .tasp-t-body b:first-child {
    background: #6b7290;
}

/* Comutatoare */
.tasp-seg {
    display: inline-flex;
    border: 1px solid #d9dce3;
    border-radius: 8px;
    overflow: hidden;
}
.tasp-seg button {
    border: 0;
    border-right: 1px solid #d9dce3;
    background: #fff;
    color: #2b3245;
    padding: 7px 16px;
    cursor: pointer;
    font: inherit;
}
.tasp-seg button:last-child {
    border-right: 0;
}
.tasp-seg button.tasp-on {
    background: #2b3245;
    color: #fff;
}
.tasp-seg-wide {
    display: flex;
}
.tasp-seg-wide button {
    flex: 1 1 0;
    text-align: left;
}
.tasp-seg button small {
    display: block;
    font-size: 12px;
    opacity: .75;
}
.tasp-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tasp-swatches button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 7px;
    border: 1px solid #d9dce3;
    border-radius: 20px;
    background: #fff;
    color: #2b3245;
    cursor: pointer;
    font: inherit;
}
.tasp-swatches button i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}
.tasp-swatches button.tasp-on {
    border-color: #2b3245;
    box-shadow: 0 0 0 1px #2b3245;
    font-weight: 600;
}
.tasp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
}
.tasp-note {
    margin: 16px 0 0;
    color: #5b6478;
    font-size: 13px;
}
.tasp-foot {
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e7e8ec;
}
.tasp-btn {
    padding: 8px 18px;
    border: 1px solid #d9dce3;
    border-radius: 6px;
    background: #fff;
    color: #2b3245;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}
.tasp-btn-primary {
    background: #2b3245;
    border-color: #2b3245;
    color: #fff;
}
.tasp-busy .tasp-btn {
    opacity: .5;
    pointer-events: none;
}
.tasp-card:focus-visible, .tasp-seg button:focus-visible, .tasp-swatches button:focus-visible, .tasp-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .tasp-backdrop {
        padding: 0;
        align-items: flex-end;
    }
    .tasp-dialog {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }
    .tasp-cards {
        grid-template-columns: 1fr;
    }
    .tasp-seg-wide {
        flex-direction: column;
    }
    .tasp-seg-wide button {
        border-right: 0;
        border-bottom: 1px solid #d9dce3;
    }
    .tasp-seg-wide button:last-child {
        border-bottom: 0;
    }
}

/* Fereastra urmeaza modul intunecat al paginii (framework6 / 6.1) */
body.dark-version .tasp-dialog {
    background: #1e2033;
    color: #d6d9e6;
}
body.dark-version .tasp-head, body.dark-version .tasp-foot {
    border-color: #2f3248;
}
body.dark-version .tasp-head h5, body.dark-version .tasp-card-text strong {
    color: #f1f3fa;
}
body.dark-version .tasp-card, body.dark-version .tasp-seg button, body.dark-version .tasp-swatches button, body.dark-version .tasp-btn {
    background: #23263b;
    color: #d6d9e6;
    border-color: #3a3d55;
}
body.dark-version .tasp-card-text small, body.dark-version .tasp-label, body.dark-version .tasp-note, body.dark-version .tasp-old summary {
    color: #a3a9bf;
}
body.dark-version .tasp-card.tasp-selected, body.dark-version .tasp-swatches button.tasp-on {
    border-color: #e5e7f0;
    box-shadow: 0 0 0 1px #e5e7f0;
}
body.dark-version .tasp-seg button.tasp-on, body.dark-version .tasp-btn-primary {
    background: #e5e7f0;
    border-color: #e5e7f0;
    color: #1e2033;
}

/* Revenirea la tema veche (dupa migrare) si mesajul de dupa migrare */
.tasp-link {
    padding: 0;
    border: 0;
    background: none;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}
.tasp-notice {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 99999;
    max-width: 360px;
    padding: 14px 16px;
    background: #fff;
    color: #2b3245;
    border: 1px solid #e7e8ec;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}
.tasp-notice p {
    margin: 0 0 10px;
}
.tasp-notice .tasp-notice-alt {
    color: #5b6478;
    font-size: 13px;
}
body.dark-version .tasp-notice .tasp-notice-alt {
    color: #a3a9bf;
}
.tasp-notice div {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
body.dark-version .tasp-notice {
    background: #1e2033;
    color: #d6d9e6;
    border-color: #3a3d55;
}
body.dark-version .tasp-link {
    color: #8ab4ff;
}
@media (max-width: 575.98px) {
    .tasp-notice {
        left: 16px;
        max-width: none;
    }
}
