
/* ============================================================
   TIPNIX BRAND + UX FINISH
   ============================================================ */

:root {
    --tnx-bg: #f6f7f9;
    --tnx-surface: #ffffff;
    --tnx-text: #17191c;
    --tnx-muted: #717780;
    --tnx-border: #e5e8ec;
    --tnx-black: #17191c;
    --tnx-green: #137a4b;
    --tnx-green-bg: #ecf8f1;
    --tnx-red: #b42318;
    --tnx-red-bg: #fff1f0;
    --tnx-orange: #9a5b00;
    --tnx-orange-bg: #fff7e8;
}


/* ------------------------------------------------------------
   Brand
   ------------------------------------------------------------ */

.tnx-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--tnx-text);
    text-decoration: none;

    font-size: 19px;
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1;

    flex: 0 0 auto;
}

.tnx-brand:hover {
    opacity: .82;
}

.tnx-brand-mark {
    width: 34px;
    height: 34px;

    display: block;

    border-radius: 10px;
}

.tnx-brand-name {
    display: inline-block;
}

.tnx-brand-floating {
    position: fixed;
    top: 19px;
    left: 28px;
    z-index: 900;
}


/* Wenn eine Navigation existiert, wird das Logo durch JS
   dort hineingeschoben. */

.tnx-brand-in-header {
    position: relative;
    margin-right: 20px;
}


/* ------------------------------------------------------------
   Dashboard
   ------------------------------------------------------------ */

main.tnx-dashboard {
    padding-top: 34px;
}

.tnx-dashboard .hero,
.tnx-dashboard .page-header,
.tnx-dashboard .dashboard-header {
    position: relative;

    margin-bottom: 26px;
    padding: 26px;

    background: #ffffff;
    border: 1px solid var(--tnx-border);
    border-radius: 18px;

    box-shadow:
        0 1px 2px rgba(16, 24, 40, .03),
        0 7px 24px rgba(16, 24, 40, .04);
}

.tnx-dashboard h1 {
    letter-spacing: -.04em;
}

.tnx-dashboard-kicker {
    display: inline-flex;
    align-items: center;

    margin-bottom: 8px;

    color: var(--tnx-muted);

    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tnx-dashboard .card {
    transition:
        border-color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.tnx-dashboard .card:hover {
    border-color: #d9dde3;

    box-shadow:
        0 2px 3px rgba(16, 24, 40, .03),
        0 9px 24px rgba(16, 24, 40, .05);
}


/* ------------------------------------------------------------
   Empty States
   ------------------------------------------------------------ */

.tnx-empty-state {
    position: relative;

    min-height: 150px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 26px 26px 26px 74px !important;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fafbfc
        ) !important;

    border:
        1px dashed
        #d8dde4 !important;

    border-radius: 16px !important;

    color: var(--tnx-muted);
}

.tnx-empty-state::before {
    content: "";

    position: absolute;
    left: 24px;
    top: 50%;

    width: 30px;
    height: 30px;

    transform: translateY(-50%);

    border:
        7px solid
        #eef0f3;

    border-radius: 50%;

    box-shadow:
        inset 0 0 0 2px
        #d8dde3;
}

.tnx-empty-state strong,
.tnx-empty-state h2,
.tnx-empty-state h3 {
    color: var(--tnx-text);
}


/* ------------------------------------------------------------
   Flash / Toast Messages
   ------------------------------------------------------------ */

.tnx-toast-stack {
    position: fixed;
    top: 76px;
    right: 24px;

    z-index: 5000;

    width: min(
        390px,
        calc(100vw - 32px)
    );

    pointer-events: none;
}

.tnx-toast {
    position: relative;

    margin-bottom: 10px;

    padding: 14px 42px 14px 16px;

    background: #ffffff;

    border: 1px solid var(--tnx-border);
    border-radius: 13px;

    color: var(--tnx-text);

    box-shadow:
        0 14px 38px
        rgba(16, 24, 40, .13);

    font-size: 14px;
    line-height: 1.45;

    pointer-events: auto;

    animation:
        tnxToastIn
        .22s
        ease-out;
}

.tnx-toast-success {
    border-left:
        4px solid
        var(--tnx-green);
}

.tnx-toast-error {
    border-left:
        4px solid
        var(--tnx-red);
}

.tnx-toast-warning {
    border-left:
        4px solid
        #d68b15;
}

.tnx-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 28px;
    height: 28px;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #7b818a;

    box-shadow: none;

    font-size: 19px;
    line-height: 1;

    cursor: pointer;
}

.tnx-toast-close:hover {
    background: #f2f3f5;
}

.tnx-toast-out {
    opacity: 0;
    transform: translateY(-5px);

    transition:
        opacity .18s ease,
        transform .18s ease;
}

@keyframes tnxToastIn {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ------------------------------------------------------------
   Confirmation Modal
   ------------------------------------------------------------ */

.tnx-modal-backdrop {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(
            15,
            18,
            22,
            .42
        );

    backdrop-filter: blur(4px);
}

.tnx-modal-backdrop.tnx-open {
    display: flex;
}

.tnx-modal {
    width: min(
        430px,
        100%
    );

    padding: 24px;

    background: #ffffff;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .6
        );

    border-radius: 18px;

    box-shadow:
        0 24px 70px
        rgba(
            16,
            24,
            40,
            .26
        );

    animation:
        tnxModalIn
        .18s
        ease-out;
}

.tnx-modal-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    border-radius: 12px;

    background: var(--tnx-orange-bg);
    color: var(--tnx-orange);

    font-size: 20px;
    font-weight: 800;
}

.tnx-modal h2 {
    margin: 0 0 8px;

    font-size: 21px;
    letter-spacing: -.025em;
}

.tnx-modal p {
    margin: 0 0 22px;

    color: var(--tnx-muted);
}

.tnx-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tnx-modal-actions button {
    min-width: 100px;
}

.tnx-modal-confirm-danger {
    background: var(--tnx-red) !important;
    border-color: var(--tnx-red) !important;
    color: #ffffff !important;
}

.tnx-modal-confirm-danger:hover {
    background: #941b13 !important;
}

@keyframes tnxModalIn {
    from {
        opacity: 0;
        transform:
            translateY(6px)
            scale(.985);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ------------------------------------------------------------
   Loading
   ------------------------------------------------------------ */

.tnx-submitting {
    opacity: .68;
    pointer-events: none;
}

.tnx-submitting::after {
    content: "";

    width: 14px;
    height: 14px;

    margin-left: 8px;

    border:
        2px solid
        currentColor;

    border-right-color:
        transparent;

    border-radius: 50%;

    animation:
        tnxSpin
        .65s
        linear
        infinite;
}

@keyframes tnxSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ------------------------------------------------------------
   Buttons: destructive actions
   ------------------------------------------------------------ */

button.tnx-danger-action,
.button.tnx-danger-action,
a.tnx-danger-action {
    color: var(--tnx-red);
}

button.tnx-danger-action:hover,
.button.tnx-danger-action:hover,
a.tnx-danger-action:hover {
    background: var(--tnx-red-bg);
}


/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 700px) {
    .tnx-brand-floating {
        top: 14px;
        left: 12px;
    }

    .tnx-brand-name {
        font-size: 17px;
    }

    .tnx-brand-mark {
        width: 31px;
        height: 31px;
    }

    .tnx-toast-stack {
        top: 68px;
        left: 11px;
        right: 11px;

        width: auto;
    }

    .tnx-modal {
        padding: 20px;
    }

    .tnx-modal-actions {
        flex-direction: column-reverse;
    }

    .tnx-modal-actions button {
        width: 100%;
    }

    .tnx-empty-state {
        min-height: 130px;
        padding:
            60px
            18px
            20px
            18px !important;
    }

    .tnx-empty-state::before {
        top: 20px;
        left: 18px;

        transform: none;
    }
}
