﻿/* ===== NsCard: generic card dialog ===== */
.ns-card {
    resize: both;
    position: fixed;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 20px);
    min-width: 250px;
    min-height: 120px;
    max-width: calc(100vw - 20px);
    overflow: hidden;
    background: #fff;
    color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

.ns-card-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.ns-card-title {
    font-weight: bold;
    font-size: 18px;
}

.ns-card-close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 0 2px 0;
    border: none;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

    .ns-card-close:hover {
        background: #495057;
    }

    .ns-card-close:focus-visible {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }

/* Body scrolls only when content is taller than the viewport */
.ns-card-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
}

.ns-card-buttons {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 10px 12px;
}

.ns-card-button {
    padding: 6px 14px;
    border: 1px solid #6c757d;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 14px;
    cursor: pointer;
}

.ns-card-button-primary {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.ns-card-footer {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 13px;
    text-align: right;
}

/* Mobile: full width with a margin; NsCard sets no inline position here */
@media (max-width: 768px) {
    .ns-card {
        top: 10px;
        left: 10px;
        right: 10px;
        resize: none;
    }
}

/* ===== Payout card content ===== */
.payout-table {
    border-collapse: collapse;
}

    .payout-table th {
        padding: 3px 12px 3px 0;
        text-align: right;
        font-weight: bold;
        white-space: nowrap;
    }

    .payout-table td {
        padding: 3px 0;
        text-align: left;
    }
