/* here.royalarts.org — attendance kiosk styles
   Depends on: /assets/icons.svg (SVG sprites)
   Fonts: Google Fonts (Roboto)
   Background: /img/cbg3.png
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* ── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
    --background:       #020736;
    --bubble:           linear-gradient(to bottom, #D3D3D3, #ADD8E6);
    --alpha:            linear-gradient(to bottom, #4e2da9, #020736);
    --green:            #95e795;
    --blue:             #92bcf7;
    --blue1:            #4e6aaa;
    --blue3:            #1a3a7a;
    --red:              #ed5656;
    --opurple:          #2b3048;
    --odarkpurple:      #010102;
    --opurplecardhi:    #244679;
    --opurplecardlo:    #0e2340;
    --purple:           #7c54e0;
    --menubg:           #0d1b5e;
    --imperial-red:     #c00;
    --ogray:            #aaa;
    --oblue:            #1a3068;
    --text:             #fff;
    --level2:           #1a4a7a;
    --level3:           #144a6c;
    --level4:           #1e6090;
    --level5:           #2a82b8;
    --purple-shadow:    0 4px 8px 0 rgba(206, 21, 243, 0.429),
                        0 6px 20px 0 rgba(255, 255, 255, 0.584);
    --shadow:           0 2px 4px 0 rgba(0,0,0,0.2),
                        0 3px 10px 0 rgba(0,0,0,0.19);
}

/* ── BASE ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
a { text-decoration: none; color: var(--level4); }
a:hover { text-decoration: none; color: var(--blue); }

body {
    background-color: var(--background);
    background-image: url("/img/cbg3.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    height: 100%;
}

/* ── SVG ICON HELPERS ───────────────────────────────────────────────────── */
.icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    fill: currentColor;
}
.icon-star {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: #e6a800;
}
.icon-weapon {
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    vertical-align: middle;
    fill: currentColor;
}

/* ── HEADER ─────────────────────────────────────────────────────────────── */
h1 {
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 20px 20px 14px;
}
h1 strong { font-weight: 700; }

/* ── SEARCH BOX ─────────────────────────────────────────────────────────── */
.search-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.search-wrap input {
    width: min(420px, 90vw);
    font-size: 22px;
    padding: 10px 16px;
    border-radius: 30px;
    border: 2px solid var(--blue1);
    background: var(--menubg);
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.search-wrap input::placeholder { color: #7899cc; }
.search-wrap input:focus { border-color: var(--blue); }

/* ── LETTER BAR ─────────────────────────────────────────────────────────── */
.letter-group {
    display: flex;
    flex-wrap: wrap;
    padding: 0 16px 16px;
    justify-content: center;
    gap: 8px;
}
.letter-picker {
    font-size: 28px;
    width: 52px;
    height: 52px;
    color: #fff;
    background: var(--alpha);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 2px solid #7c96cc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    padding: 0;
}
.letter-picker:hover,
.letter-picker.active {
    background: linear-gradient(to bottom, #7c54e0, #2d1880);
    transform: scale(1.1);
}
.letter-picker-b {
    font-size: 16px;
    font-weight: 700;
    height: 52px;
    padding: 0 16px;
    color: #fff;
    background: var(--alpha);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 2px solid #7c96cc;
    border-radius: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
    transition: background 0.15s, transform 0.1s;
}
.letter-picker-b:hover,
.letter-picker-b.active {
    background: linear-gradient(to bottom, #7c54e0, #2d1880);
    transform: scale(1.05);
}
/* Legacy span wrapper inside buttons */
.letter-picker span,
.letter-picker-b span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── FENCER GRID ─────────────────────────────────────────────────────────── */
.fencer-group {
    padding: 10px 30px 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ── FENCER CARD ─────────────────────────────────────────────────────────── */
.fencer-card {
    width: 380px;
    min-height: 72px;          /* was height:60px !important — now flexible */
    color: #111;
    background: var(--bubble);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border: 1px solid #5b7d85;
    border-radius: 14px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}
.fencer-card:hover    { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.35); }
.fencer-card.greenbg  { background: var(--green); cursor: default; }
.fencer-card.greenbg:hover { transform: none; }
.fencer-card.bluebg   { background: linear-gradient(to bottom, #b0d0f7, #80aaee); }
.fencer-card.goldbg   { background: linear-gradient(to bottom, #f7e0a0, #e8c044); }
/* membership due — keep red hint but avoid is-due class name collision */
.fencer-card.bg-due-card { background: linear-gradient(to bottom, #f7b0b0, #f08080); }

/* Card layout — avatar left column, text right */
.card-detail {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.avatar {
    width: 72px;
    min-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0,0,0,0.1);
    border-top-left-radius: 13px;
    border-bottom-left-radius: 13px;
    overflow: hidden;
}
.avatar img,
.memberphoto {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-top-left-radius: 13px;
    border-bottom-left-radius: 13px;
}
.initials {
    font-size: 30px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: #5a7a88;
    text-align: center;
}
.fencer {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.fencer-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.fencer-name .lastname { text-transform: uppercase; }
.fencer-detail {
    font-size: 13px;
    color: #333;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/* Status badges */
.bg-due {
    background: #d00;
    color: #fff;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
}
.bg-birthday {
    background: #0083da;
    color: #fff;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
}
.bg-anniv {
    background: goldenrod;
    color: #fff;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
}
.bg-norm { display: inline-block; font-size: 12px; color: #555; }

/* Loading state */
.loading-state {
    color: #aac;
    text-align: center;
    font-size: 18px;
    padding: 40px;
    width: 100%;
}

/* ── STAT GROUP ──────────────────────────────────────────────────────────── */
.stat-group { padding: 0 30px 40px; }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar {
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    z-index: 100;
    border: 2px solid var(--purple);
    box-shadow: var(--purple-shadow);
    color: var(--text);
    transition: 0.5s;
    background: linear-gradient(180deg, var(--opurplecardhi) 0%, var(--opurplecardlo) 100%);
    overflow-x: hidden;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}
.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    color: #fff;
    text-decoration: none;
}
.sidebar a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: var(--text);
    display: block;
    transition: 0.3s;
}
.sidebar a:hover { color: var(--blue); }
#sidebarBody {
    padding-top: 40px;
    padding-left: 20px;
    padding-right: 20px;
}

/* ── SEASON / RANKING ────────────────────────────────────────────────────── */
.season-block { display: flex; }
.season-list {
    display: flex;
    background-color: #f2f2f2;
    border: 1px solid var(--level3);
    width: 800px;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 5px;
}
.season-rank { font-size: 32px; font-weight: bold; width: 50px; }
.season-name { font-size: 20px; width: 600px; padding-left: 15px; }
.season-left, .season-right { width: 50%; }

/* ── POOL / BOUT STYLES ──────────────────────────────────────────────────── */
.vetbox {
    background-color: #144a6c;
    color: #fff;
    padding: 3px 5px;
    font-weight: bold;
    border-radius: 5px;
}
.youthbox {
    background-color: goldenrod;
    color: #fff;
    padding: 3px 5px;
    font-weight: bold;
    border-radius: 5px;
}

/* ── UTILITY BUTTONS ─────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn-sm {
    display: inline-block;
    font-weight: 400;
    border: 1px solid transparent;
    padding: 0.175rem 0.45rem;
    font-size: .7rem;
    line-height: .9;
    border-radius: 0.25rem;
    text-decoration: none;
}
.btn-blue {
    background-color: var(--blue);
    color: #0b2774 !important;
    text-decoration: none;
}

/* ── HIDE/SHOW helpers (JS-driven) ──────────────────────────────────────── */
.letter-show { display: flex !important; }
.letter-hide { display: none !important; }

/* ── NUMBOX WIDGETS ──────────────────────────────────────────────────────── */
.numbox-stat {
	background-color: var(--background);
	color: var(--blue);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #03152d;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.numbox {
	background-color: #92bcf7;
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-blue {
	background-color: #92bcf7;
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-blue-sm {
	background-color: #92bcf7;
	color: var(--background);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.numbox-gold {
	background-color: goldenrod;
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid rgb(142, 107, 20);
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-gold-sm {
	background-color: goldenrod;
	color: var(--background);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.numbox-silver {
	background-color: rgb(156, 156, 156);
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid rgb(99, 99, 99);
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-silver-sm {
	background-color: rgb(156, 156, 156);
	color: var(--background);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.numbox-bronze {
	background-color: rgb(131, 99, 17);
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid rgb(80, 61, 10);
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-bronze-sm {
	background-color: rgb(131, 99, 17);
	color: var(--background);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.numbox-red {
	background-color: #f79a92;
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-green {
	background-color: #96f792;
	color: var(--background);
	font-size: 32px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #7cb0fa;
	padding: 0.375rem 0.75rem;
	border-radius: 0.25rem;
}
.numbox-green-sm {
	background-color: #96f792;
	color: var(--background);
	font-size: 24px;
	margin-bottom:5px;
	margin-right: 5px;
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid #046319;
	padding: 0.125rem 0.55rem;
	border-radius: 0.25rem;
}
.btn-text {
	display: block;
	font-size: 10px;
	margin-top: 0px;
	text-transform: uppercase;
}
.btn-text-sm {
	display: block;
	font-size: 6px;
	margin-top: -3px;
	text-transform: uppercase;
}

/* ── SHADOW / CARD ───────────────────────────────────────────────────────── */
.shadow-normal {
    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 5px 0 rgba(0, 0, 0, 0.19);
    border-top: 1px solid var(--level3);
    border-left: 1px solid var(--level3);
    border-right: 1px solid var(--level2);
    border-bottom: 1px solid var(--level2);
}

/* ── MEDAL BADGES ────────────────────────────────────────────────────────── */
.gmedal {
    font-size: 11px;
    padding: 3px 5px;
    border-radius: 7px;
    background-color: goldenrod;
    color: #fff;
    font-weight: bold;
}
.smedal {
    font-size: 11px;
    padding: 3px 5px;
    border-radius: 7px;
    background-color: rgb(156, 156, 156);
    color: #fff;
    font-weight: bold;
}
.bmedal {
    font-size: 11px;
    padding: 3px 5px;
    border-radius: 7px;
    background-color: rgb(131, 99, 17);
    color: #fff;
    font-weight: bold;
}
.wmedal {
    font-size: 11px;
    padding: 3px 5px;
    border-radius: 7px;
    background-color: transparent;
    color: transparent;
    font-weight: bold;
}
