﻿/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input, select, textarea {
    width: 100%;
    max-width: 100%;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #b91c1c;
    --success: #15803d;
    --shadow: 0 10px 25px rgba(0,0,0,.06);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

.container {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px;
}

.shell {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.header {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

    .header img {
        max-height: 52px;
        width: auto;
        display: block;
    }

.header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .header-title h1 {
        font-size: 18px;
        margin: 0;
        line-height: 1.2;
    }

    .header-title .sub {
        font-size: 13px;
        color: var(--muted);
    }

.body {
    padding: 20px;
}

.h2 {
    font-size: 22px;
    margin: 0 0 6px 0;
}

.p {
    margin: 0 0 14px 0;
    color: var(--muted);
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    padding: 16px;
}

.row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

    .input:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 4px rgba(59,130,246,.12);
    }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--primary-dark);
    }

.btn-secondary {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

    .btn-secondary:hover {
        background: #f9fafb;
    }

.alert {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: #fff;
    margin-top: 12px;
}

.alert-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--danger);
}

.alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--success);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

    .table th, .table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        font-size: 14px;
    }

    .table th {
        background: #fafafa;
        color: #374151;
        font-weight: 700;
    }

    .table tr:last-child td {
        border-bottom: none;
    }

    .table td.right, .table th.right {
        text-align: right;
    }

.hr {
    height: 1px;
    background: var(--border);
    border: 0;
    margin: 16px 0;
}

.kv {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 12px;
    margin: 10px 0 0 0;
}

    .kv .k {
        color: var(--muted);
        font-size: 13px;
    }

    .kv .v {
        font-weight: 700;
    }

.footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.35);
    backdrop-filter: blur(2px);
    z-index: 9999;
}

.loading-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 260px;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-weight: 700;
}

.loading-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.btn[disabled] {
    opacity: .7;
    cursor: not-allowed;
}


.note {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
}

.form-group {
    margin-bottom: 16px;
}

.sub {
    color: #666;
    margin-bottom: 20px;
}

.error {
    margin-top: 12px;
    color: #c00;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

/* Stacked header variant (logo + titles centered) */
.header.header-stacked {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

    .header.header-stacked .header-logo,
    .header.header-stacked img {
        max-height: 80px;
    }

    .header.header-stacked .header-title {
        align-items: center;
    }

        .header.header-stacked .header-title h1.auction-name {
            font-size: 22px;
            margin: 0;
            line-height: 1.2;
        }

    .header.header-stacked .page-title {
        font-size: 16px;
        font-weight: 700;
        color: #374151;
        margin-top: 2px;
    }

.cert-badge {
    background: red;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

/* Make the ASP.NET logo image truly responsive */
.header-logo {
    display: block;
    width: 100%;
    max-width: 320px; /* desktop cap - adjust */
    height: auto; /* preserve aspect ratio */
    margin: 0 auto; /* center */
    object-fit: contain; /* safety */
}

/* Stacked header variant (logo + titles centered) */
.header.header-stacked {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

    /* In stacked mode, don't rely on max-height alone */
    .header.header-stacked .header-logo {
        max-width: min(320px, 80vw); /* shrink on phones */
        max-height: 80px; /* keep it from getting too tall */
        width: auto; /* allow natural width within cap */
        height: auto;
    }

/* Optional: even smaller on very small phones */
@media (max-width: 480px) {
    .header.header-stacked .header-logo {
        max-width: 70vw;
        max-height: 64px;
    }
}

#bidderNameDisplay {
    margin-top: 6px;
}

@media (max-width: 480px) {
    .kv {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }

        .kv .k {
            font-size: 12px;
        }

        .kv .v {
            margin-bottom: 8px;
        }
}

/* Bidder inline layout */
.bidder-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap; /* mobile friendly */
}

.bidder-input {
    max-width: 160px;
}

.bidder-name {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

    /* Optional: subtle emphasis when name present */
    .bidder-name strong {
        color: var(--text);
    }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

    .section-head .h2 {
        margin: 0;
    }


.print-only {
    display: none;
}


