/* Leid-specific styles layered on top of webkit/static/core.css. */

:root {
    --brand: #0f766e;
}

.website-field {
    position: absolute;
    left: -10000px;
    width: 30px;
    height: 10px;
    overflow: hidden;
}

.leid-intro-grid {
    margin-top: 3rem;
}

.leid-section {
    margin-top: 1.5rem;
}

.collection-create-toolbar {
    margin-bottom: 0.85rem;
}

.collection-create-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.collection-create-display {
    flex: 1 1 22rem;
    min-width: 14rem;
}

.collection-create-row select {
    flex: 0 1 13rem;
    min-width: 10rem;
    appearance: none;
    height: 2.4rem;
    box-sizing: border-box;
    padding: 0 2.5rem 0 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background-color: var(--background, #fff);
    background-image: linear-gradient(45deg, transparent 50%, var(--muted, #64748b) 50%), linear-gradient(135deg, var(--muted, #64748b) 50%, transparent 50%);
    background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.75rem) 50%;
    background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
    background-repeat: no-repeat;
    color: inherit;
    font: inherit;
    line-height: 1.4;
}

.collection-create-row select:focus {
    outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
    outline-offset: 1px;
}

.collection-create-row .btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .collection-create-row {
        flex-direction: column;
        align-items: stretch;
    }

    .collection-create-display,
    .collection-create-row select {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .collection-create-row .btn {
        width: 100%;
        justify-content: center;
    }
}

.server-card {
    display: block;
}

.server-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.server-card-details {
    min-width: 0;
}

.server-card-details dl {
    margin-bottom: 0;
}

.server-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 0 0 auto;
}

.server-header-actions form {
    margin: 0;
}

.server-clients {
    min-width: 0;
    padding: 1.25rem;
    background: var(--surface, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.server-clients h3,
.client-card h3 {
    margin: 0;
}

.client-create-toolbar {
    display: grid;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.client-create-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.client-create-row input {
    flex: 1 1 10rem;
    min-width: 0;
}

.client-create-row .btn,
.client-actions .btn {
    white-space: nowrap;
}

.client-table-wrap {
    margin-top: 1rem;
    overflow-x: auto;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
}

.client-table th,
.client-table td {
    padding: 0.75rem 0;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.client-table th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.client-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-table td:nth-child(2) {
    color: var(--muted);
}


.client-table-actions {
    text-align: right !important;
}

.client-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.client-actions form {
    margin: 0;
}

.client-empty {
    margin: 1rem 0 0;
    color: var(--muted);
}

.qr-modal[hidden] {
    display: none;
}

.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.qr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 60%);
}

.qr-modal-panel {
    position: relative;
    width: min(100%, 32rem);
    padding: 1.5rem;
    text-align: center;
    background: var(--background, #fff);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    box-shadow: 0 1rem 3rem rgb(15 23 42 / 25%);
}

.qr-modal-panel h2 {
    margin: 0 2rem 1rem;
}

.qr-modal-panel img {
    display: block;
    width: min(100%, 28rem);
    height: auto;
    margin: 0 auto 1rem;
}

.qr-modal-panel p {
    margin: 0;
    color: var(--muted);
}

.qr-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    padding: 0.1rem 0.45rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.qr-modal-close:hover,
.qr-modal-close:focus-visible {
    color: var(--text);
}

.qr-modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .server-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .server-header-actions {
        align-self: flex-end;
    }

    .client-table th,
    .client-table td {
        padding-right: 1rem;
    }

    .client-table-actions,
    .client-actions {
        justify-content: flex-start;
        text-align: left !important;
    }
}

.leid-icon {
    color: var(--brand);
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.card h2 {
    margin-bottom: 0.75rem;
}

.card ol {
    margin-bottom: 0;
}

.leid-location-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.leid-location-list li {
    color: var(--muted);
}

footer.site-footer {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-footer-meta {
    margin-top: 0.65rem;
}
