/* --- Base layout --- */

body.capture-body {
    margin: 0;
    background-color: #020617;   /* dark navy */
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* If some templates don't use capture-body yet */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617; /* near-black */
    color: #e5e7eb;      /* light grey */
}

/* --- Main & container --- */

.cap-main,
.capture-main {
    min-height: calc(100vh - 120px);
}

.cap-container {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
}
.capture-logo img {
    height: 50px;
    filter: brightness(1.8) contrast(1.4) drop-shadow(0 0 3px rgba(255,255,255,0.4));
}

/* --- Messages --- */

.cap-messages {
    margin-bottom: 1rem;
}

.cap-message {
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cap-message-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.6);
}

.cap-message-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.6);
}

.cap-message-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.6);
}

.cap-message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.7);
}

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #1d4ed8;
    color: #e5e7eb;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

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

/* Make buttons full width on narrow screens if needed */
@media (max-width: 480px) {
    .btn {
        padding: 0.5rem 0.8rem;
    }
}

/* --- Forms --- */

form {
    max-width: 480px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    margin: 0.2rem 0 0.8rem;
    border-radius: 0.4rem;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
}

label {
    font-size: 0.9rem;
}

/* --- Footer --- */

.cap-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.75rem 0;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* --- Clip list: cards, mobile-first --- */

.clip-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.clip-card {
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.clip-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.clip-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.clip-angle-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

.clip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* On larger screens, make cards a bit more compact horizontally */
@media (min-width: 640px) {
    .clip-card {
        flex-direction: row;
        align-items: center;
    }
    .clip-card-top {
        margin-bottom: 0;
    }
    .clip-actions {
        margin-left: auto;
        justify-content: flex-end;
    }
}

/* --- Video player --- */

.cap-video {
    width: 100%;
    max-height: 60vh;
    background: #000;
    border-radius: 0.75rem;
    border: 1px solid rgba(30, 64, 175, 0.7);
    overflow: hidden;
}

/* Headings */

h1, h2, h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 1.3rem;
}

h2 {
    font-size: 1.1rem;
}

/* --- Tables: dark theme, better spacing --- */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

th {
    text-align: left;
    color: #e5e7eb;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.9);
}

tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.75);
}

tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.55);
}

/* Generic "card" style override for any white tiles */

.card,
.panel,
.box,
.tile {
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 0.6rem;
}

/* --- Club header --- */

.club-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.club-logo {
    width: 64px;
    height: auto;
    border-radius: 0.5rem;
    background: #020617;
}

.club-header-text h1 {
    margin: 0;
    font-size: 1.4rem;
}

.club-header-text .club-location {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* --- Courts grid (dark tiles, no overlap) --- */

.court-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 1.25rem;
}

/* Individual tile */
.court-card {
    flex: 1 1 180px;
    max-width: 220px;

    background: #0b1120;                 /* slightly lighter than page background */
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);

    padding: 18px 12px;
    text-align: center;
    text-decoration: none;

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

    color: #e5e7eb;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
    transition: transform 0.12s ease-out,
                background 0.12s ease-out,
                border-color 0.12s ease-out;
}

.court-card:hover {
    transform: translateY(-3px);
    background: #111827;
    border-color: #2563eb;               /* blue accent */
}

/* Logo inside tile */
.court-card-logo {
    max-width: 70px;                     /* smaller than before */
    margin-bottom: 10px;
    filter: brightness(1.15);
}

/* Court name text */
.court-card-name {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Mobile: full-width tiles */
@media (max-width: 600px) {
    .court-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ---------- CAPTURE HEADER ---------- */

.capture-header {
    background: #020617;
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 20;
}

.capture-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Brand block */

.capture-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #e5e7eb;
}

.capture-logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;                /* slightly lighter pill behind logo */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.45);
}

.capture-logo-img {
    max-width: 50px;
    height: auto;
    filter: brightness(1.4);            /* helps light/dark logos pop */
}

.capture-brand-text {
    display: flex;
    flex-direction: column;
}

.capture-brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.capture-brand-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #93c5fd;                     /* blue accent */
}

/* Nav */

.capture-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.capture-nav a {
    color: #cbd5f5;
    text-decoration: none;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.capture-nav a:hover {
    border-color: #1d4ed8;
    background: rgba(37, 99, 235, 0.15);
}

/* Layout below header – already covered by .cap-container */

/* Mobile tweaks */

@media (max-width: 600px) {
    .capture-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .capture-nav {
        width: 100%;
    }

    .capture-logo-circle {
        width: 36px;
        height: 36px;
    }

    .capture-brand-title {
        font-size: 1.2rem;
    }

    .capture-brand-subtitle {
        font-size: 0.7rem;
    }
}

.header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo-wrapper::before {
    content: "";
    width: 52px;
    height: 52px;
    background: white;
    border-radius: 50%;
    position: absolute;
    z-index: 0;
}
