﻿/* wwwroot/css/withdraw.css */

/* Farben */
:root {
    --withdraw-red: #dc3545; /* aktives Rot */
    --withdraw-red-light: #f5c6cb; /* inaktives helles Rot (Rand) */
    --text-white: #ffffff;
    --text-muted-light: #e5e7eb; /* deutlich helleres Grau für inaktive Schrift */
    --focus-ring: 0 0 0 3px rgba(220,53,69,0.18);
}

/* Header Container: sorgt dafür, dass Aktionen rechtsbündig mit Abstand sind */
.header-actions {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Basisstil */
.btn-withdraw {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    /* Rechtsbündig mit 4rem Abstand zum rechten Rand */
    .btn-withdraw.align-right {
        margin-left: auto;
        margin-right: 4rem;
    }

    /* Aktiver Zustand (angemeldet) */
    .btn-withdraw.active {
        background-color: var(--withdraw-red);
        color: var(--text-white);
        border-color: var(--withdraw-red);
        box-shadow: none;
    }

        .btn-withdraw.active:hover,
        .btn-withdraw.active:focus {
            background-color: #c82333;
            border-color: #c82333;
            box-shadow: var(--focus-ring);
        }

    /* Inaktiver Zustand (nicht angemeldet) */
    .btn-withdraw.inactive {
        background-color: transparent;
        color: var(--text-muted-light);
        border-color: var(--withdraw-red-light);
        cursor: default;
        opacity: 1;
    }

        .btn-withdraw.inactive:hover,
        .btn-withdraw.inactive:focus {
            box-shadow: none;
        }

    /* Disabled attribute (HTML disabled) */
    .btn-withdraw[disabled],
    .btn-withdraw.disabled {
        pointer-events: none;
        opacity: 0.9;
    }

    /* Icon Styling */
    .btn-withdraw .icon {
        width: 1rem;
        height: 1rem;
        display: inline-block;
        vertical-align: middle;
        fill: currentColor;
    }

    /* Fokus für Tastaturbenutzer */
    .btn-withdraw:focus {
        outline: none;
        box-shadow: var(--focus-ring);
    }

/* Kleine Bildschirme: kompakter */
@media (max-width: 576px) {
    .btn-withdraw {
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
    }

        .btn-withdraw.align-right {
            margin-right: 1rem; /* weniger Abstand auf sehr kleinen Bildschirmen */
        }
}

/* Tooltip (optional) */
.btn-withdraw[data-tooltip]:hover::after,
.btn-withdraw[data-tooltip]:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #111827;
    color: #fff;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    transform: translateY(-0.5rem);
    white-space: nowrap;
    z-index: 1000;
}
