/* ==========================================================================
   DivvyItUp - Design refresh (logo-inspired palette, responsive)
   ========================================================================== */

:root {
    /* Logo-inspired palette */
    --bg-dark: #2d3747;
    --bg-dark-subtle: #3d4a5c;
    --accent-orange: #e07c3c;
    --accent-red: #c75050;
    --accent-green: #4a9b6e;
    --accent-blue: #4a7ab8;
    --text-on-dark: #ffffff;
    --text-primary: #1a202c;
    --text-muted: #4a5568;
    --surface: #ffffff;
    --surface-alt: #f7fafc;
    --border: #e2e8f0;
    --radius: 8px;
    --radius-sm: 5px;
    --shadow: 0 1px 3px rgba(45, 55, 71, 0.12);
    --shadow-md: 0 4px 6px rgba(45, 55, 71, 0.1);
    --transition: 0.2s ease;
}

/* Base
   ---------- */
html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    background-image: url("/objects/images/backgrounds/blue-spots.jpg");
    background-position: center;
    background-size: cover;
    color: var(--text-primary);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
    padding: 0;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

blockquote {
    color: var(--text-muted);
    margin: 30px 40px;
}

li {
    margin-bottom: 12px;
    list-style-type: disc;
}

ul {
    margin: 20px 0 0 0;
}

/* Layout - responsive container
   ---------- */
#container {
    background-color: var(--bg-dark);
    border-radius: var(--radius);
    margin: 0 auto;
    padding: 20px 16px;
    position: relative;
    width: 100%;
    max-width: 980px;
}

@media (min-width: 640px) {
    #container {
        padding: 20px;
    }
}

/* Header
   ---------- */
#header {
    color: var(--text-on-dark);
    min-height: 94px;
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#header a {
    color: var(--text-on-dark);
    text-decoration: none;
}

#header a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

#header #logo {
    flex-shrink: 0;
    text-align: left;
}

#header #logo .logo-img {
    display: block;
    height: auto;
    max-height: 22px;
    width: auto;
    max-width: 100%;
}

@media (min-width: 640px) {
    #header #logo .logo-img {
        max-height: 48px;
    }
}

#header #login {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

#header #login .welcomeText {
    display: block;
    padding-top: 0;
    margin-bottom: 8px;
}

#header #login .formRow,
#header #login .formButton {
    display: inline-block;
    margin-left: 0;
    margin-right: 10px;
    margin-bottom: 8px;
    vertical-align: top;
}

#header span {
    font-size: 12px;
    font-weight: normal;
}

#header #loginInfo {
    margin-left: auto;
    text-align: right;
}

/* Nav
   ---------- */
#nav {
    width: 100%;
    position: relative;
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.navTabItem {
    background: var(--bg-dark-subtle);
    border-radius: 5px 5px 0 0;
    color: var(--text-on-dark);
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    padding: 8px 14px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.navTabItem.on,
#navAdmin.on,
.navTabItem.on:hover,
#navAdmin.on:hover {
    background: var(--surface);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 600;
}

.navTabItem:hover {
    background: var(--bg-dark-subtle);
    color: var(--accent-orange);
    text-decoration: none;
}

#navAdmin {
    background: var(--accent-red);
}

#navAdmin.on {
    color: var(--accent-red);
}

#navAdmin:hover {
    background: #d96a6a;
    color: var(--text-on-dark);
}

/* Body / main content
   ---------- */
#body {
    background: var(--surface);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-top-right-radius: var(--radius);
    padding: 28px 20px;
    width: 100%;
    margin-top: 0;
    box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
    #body {
        padding: 48px 40px;
    }
}

/* Footer
   ---------- */
#footer {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    width: 100%;
    max-width: 980px;
    margin: 0 auto 20px auto;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

#footer a {
    color: rgba(255, 255, 255, 0.9);
}

#footer a:hover {
    color: var(--accent-orange);
}

#footer #navUtility {
    order: 1;
    text-align: left;
}

#footer #loadTime {
    order: 2;
    margin-left: auto;
    text-align: right;
}

.clear {
    clear: both;
}

/* Images
   ---------- */
.imageFloatLeft {
    margin-bottom: 20px;
    margin-right: 20px;
    float: left;
    max-width: 100%;
}

.imageFloatRight {
    margin-bottom: 20px;
    margin-left: 20px;
    float: right;
    max-width: 100%;
}

@media (max-width: 480px) {
    .imageFloatLeft,
    .imageFloatRight {
        float: none;
        margin-left: 0;
        margin-right: 0;
        display: block;
    }
}

/* Forms
   ---------- */
form {
    display: inline;
}

.formRow {
    margin-bottom: 20px;
    position: relative;
}

.formLabel {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.formLabel span {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
}

label {
    display: block;
}

input,
textarea,
select {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
}

textarea.comments {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    height: 100px;
    width: 100%;
    max-width: 529px;
    font-size: 14px;
}

.inputText {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    padding: 6px 10px;
    max-width: 100%;
}

input.playerStat {
    width: 14px;
    text-align: right;
    height: 12px;
    padding: 0;
    font-size: 11px;
}

.inputSelect {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    padding: 6px 8px;
}

.inputCheckbox {
    margin: 0;
}

input.hidden {
    width: 0;
    height: 0;
    border: none;
    overflow: hidden;
    display: none;
}

/* Buttons
   ---------- */
.button,
.adminButton,
input.inputSubmit {
    background-color: var(--accent-blue);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-on-dark);
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 4px 4px 0;
    padding: 8px 14px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background var(--transition), transform 0.1s ease;
}

input.inputSubmit {
    height: auto;
    padding: 8px 14px;
}

.button.big,
.adminButton.big {
    border-radius: var(--radius);
    font-size: 15px;
    padding: 10px 20px;
}

.button.gray,
.adminButton.gray {
    background-color: var(--text-muted);
}

.button.green,
.adminButton.green {
    background-color: var(--accent-green);
}

.button.yellow,
.adminButton.yellow {
    background-color: var(--accent-orange);
}

.button.red,
.adminButton.red {
    background-color: var(--accent-red);
}

.button:hover,
.button.green:hover,
.button.yellow:hover,
.button.red:hover,
.adminButton:hover,
.adminButton.gray:hover,
.adminButton.green:hover,
.adminButton.yellow:hover,
.adminButton.red:hover,
input.inputSubmit:hover {
    filter: brightness(1.1);
    text-decoration: none;
    color: var(--text-on-dark);
}

.overlay .button,
.overlay input.inputSubmit {
    float: left;
    margin-right: 10px !important;
}

/* Typography
   ---------- */
.headerGray {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.dropcap {
    float: left;
    color: var(--accent-red);
    font-size: 40px;
    font-weight: bold;
    line-height: 34px;
    padding-top: 2px;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

.boxGray {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.paymentBox {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    position: relative;
    padding: 16px;
}

.formBox {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    position: relative;
    padding: 16px;
    float: left;
}

/* Homepage welcome row: flexbox so block and image share height */
.welcome-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 30px;
}

.welcome-block {
    flex: 1 1 0;
    min-width: 0;
    max-width: 66.66666%;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.welcome-title::before {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-blue));
    border-radius: 2px;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .welcome-title {
        font-size: 2rem;
    }
}

.welcome-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
}

.welcome-use-cases {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.welcome-use-cases li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    list-style: none;
}

.welcome-use-cases li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
}

.welcome-cta {
    margin: 1.5rem 0 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 1rem;
}

.welcome-cta a {
    font-weight: 600;
}

.welcome-block .textHeaderBig {
    margin-bottom: 1rem;
}

.welcome-intro {
    margin-bottom: 24px;
    line-height: 1.65;
    max-width: 52em;
}

.welcome-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 33.33333%;
    min-width: 0;
}

.welcome-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .welcome-row {
        flex-direction: column;
    }

    .welcome-block,
    .welcome-image {
        flex: 1 1 100%;
        max-width: none;
    }
}

.homeBox {
    margin-bottom: 20px;
}

.homeBoxAnnouncement {
    font-size: 14px;
    margin-bottom: 20px;
    border-bottom: 1px dotted var(--border);
    padding-bottom: 20px;
}

.download {
    margin-bottom: 10px;
    line-height: 1.5;
}

.headshot {
    margin-bottom: 20px;
}

.download .boxLeft {
    position: relative;
    float: left;
    width: 32px;
}

.alternate1 {
    background: var(--surface);
}

.alternate2 {
    background: var(--surface-alt);
}

.textHeader {
    position: relative;
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-primary);
}

.textHeader select {
    font-size: 16px;
}

.textHeaderSmall {
    font-size: 14px;
    font-weight: bold;
    line-height: normal;
    margin-bottom: 18px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.textHeaderBig {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-primary);
}

@media (min-width: 640px) {
    .textHeaderBig {
        font-size: 26px;
    }
}

.textSmall {
    font-size: 13px;
}

.textGreen {
    color: var(--accent-green);
}

.textRed {
    color: var(--accent-red);
}

.textAlert {
    background: var(--accent-red);
    color: var(--text-on-dark);
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.textAlert a {
    color: var(--text-on-dark);
    text-decoration: underline;
}

.textOK {
    color: var(--accent-green);
    font-weight: bold;
    margin-bottom: 20px;
}

.textExplanation {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

.textCaption {
    font-style: italic;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 15px;
}

.textGray {
    color: var(--text-muted);
}

.currency-abbreviation {
    font-size: 10px;
}

.divider {
    border-top: 1px dotted var(--border);
    margin: 10px 0;
}

/* Popup / overlay content
   ---------- */
.popup {
    color: var(--text-primary);
    position: absolute;
    background: var(--surface);
    padding: 20px;
    width: 100%;
    max-width: 552px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    line-height: 1.5;
    box-shadow: var(--shadow-md);
}

.popup:hover,
.popupItem:hover {
    cursor: pointer;
}

.thumbnail {
    position: relative;
    float: left;
    width: 140px;
    text-align: center;
    font-size: 12px;
}

.gutter {
    position: relative;
    float: left;
    width: 12px;
}

/* Tables - responsive
   ---------- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

table {
    border-spacing: 0;
    width: 100%;
    min-width: 600px;
}

th {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 8px;
    text-align: left;
    vertical-align: bottom;
}

th:first-child {
    border-top-left-radius: var(--radius-sm);
}

th:last-child {
    border-top-right-radius: var(--radius-sm);
}

td {
    font-size: 13px;
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

td.edit {
    background: #fffbeb;
}

/* Breakdown / data
   ---------- */
.breakdownContainer {
    border-top: 1px dotted var(--border);
    padding: 20px 0;
}

.breakdownContainer:nth-child(3) {
    border-top: none;
    padding-top: 0;
}

.breakdownContainer .dataTable,
.breakdownContainer .graph {
    float: left;
    width: 100%;
}

@media (min-width: 900px) {
    .breakdownContainer .dataTable,
    .breakdownContainer .graph {
        width: 440px;
    }

    .breakdownContainer .graph {
        margin-left: 20px;
    }
}

.breakdownContainer .graph {
    height: 200px;
    text-align: center;
}

.breakdownContainer .graph .pieLabel {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    font-size: 10px;
    opacity: 0.9;
    line-height: 12px;
    margin: 0;
    padding: 6px;
    text-align: center;
    border-radius: var(--radius-sm);
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.textCount {
    font-size: 12px;
}

/* Date Picker
   ---------- */
img.ui-datepicker-trigger {
    cursor: pointer;
    float: left;
    height: 16px;
    margin-left: 5px;
    width: 16px;
}

#ui-datepicker-div {
    background: var(--surface) !important;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: "Open Sans", sans-serif;
    margin-top: 4px;
    padding: 0;
    width: 175px;
    box-shadow: var(--shadow-md);
}

.ui-widget-header {
    border: none;
    border-radius: 0;
    color: var(--text-on-dark);
    background: var(--accent-blue);
    font-size: 12px;
    height: 20px;
    margin: 1px 1px 0 1px;
    padding: 0 !important;
}

.ui-datepicker a.ui-datepicker-prev,
.ui-datepicker a.ui-datepicker-next {
    border-radius: 0;
    cursor: pointer;
    height: 16px;
    top: 2px;
    width: 16px;
}

.ui-datepicker a.ui-datepicker-prev {
    left: 2px;
}

.ui-datepicker a.ui-datepicker-next {
    right: 2px;
}

.ui-datepicker .ui-datepicker-prev span.ui-icon,
.ui-datepicker .ui-datepicker-next span.ui-icon {
    left: 0;
    margin: 0;
    top: 0;
}

.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
    background: none;
    border: none;
}

.ui-datepicker table {
    border-spacing: 1px !important;
    border-collapse: separate;
    margin: 0 !important;
    width: 100%;
}

.ui-datepicker th {
    background: var(--bg-dark-subtle);
    border-radius: 0;
    color: var(--text-on-dark);
    font-weight: bold;
    font-size: 11px;
    padding: 0;
}

.ui-datepicker td {
    padding: 0;
}

.ui-datepicker td a {
    background: var(--surface) !important;
    border: none !important;
    color: var(--text-primary) !important;
    font-weight: normal !important;
    font-size: 11px;
    text-align: center;
}

.ui-datepicker td.ui-datepicker-current-day a {
    background: var(--surface-alt) !important;
    font-weight: bold !important;
}

.ui-datepicker td a:hover {
    background: var(--surface-alt) !important;
}

/* Overlays (blockUI)
   ---------- */
.overlayContainer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    left: 50%;
    padding: 24px;
    text-align: left;
    top: 50%;
    box-shadow: var(--shadow-md);
    max-width: 95vw;
}

.overlay {
    display: none;
}

.overlay .title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;
}

.overlay .body {
    color: var(--text-primary);
    float: none;
    font-size: 14px;
    margin: 0;
    min-width: 100%;
    padding: 0;
    text-align: left;
}

.overlay .formRow {
    float: left;
    margin-left: 10px;
    position: relative;
}

.overlay .formRow.first {
    margin-left: 0;
}

.overlay .formButton {
    margin-top: 12px;
}

.overlay a.adminButton {
    margin: 0 10px 0 0;
}

/* Subheader / event header
   ---------- */
#subheader {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 12px;
    position: relative;
}

#subheader #eventHeader {
    float: left;
    width: 100%;
    max-width: 440px;
}

#subheader #subnav {
    bottom: 0;
    margin-bottom: -1px;
    position: absolute;
    right: 0;
}

#subheader #subnav .navTabItem {
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    margin: 0 0 0 5px;
}

#subheader #subnav .navTabItem:hover {
    border-left-color: var(--text-muted);
    border-right-color: var(--text-muted);
    border-top-color: var(--text-muted);
}

#subheader #subnav .navTabItem.on {
    border-bottom: 1px solid var(--surface);
}

/* Page header row: title left, ADD button right, vertically aligned (e.g. /events, /people) */
.pageHeaderRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.pageHeaderRow .textHeaderBig {
    margin-bottom: 0;
}

.pageHeaderRow #eventHeader {
    float: none;
    width: auto;
    max-width: none;
}

.pageHeaderRow #functionButtons {
    float: none;
    margin-bottom: 0;
    flex-shrink: 0;
}

#eventHeader {
    float: left;
    width: 100%;
    max-width: 700px;
}

#functionButtons {
    float: right;
    margin-bottom: 16px;
}

#functionButtons a {
    margin-left: 10px;
}

@media (max-width: 480px) {
    .pageHeaderRow {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    #subheader #subnav {
        position: relative;
        margin-top: 12px;
    }

    #eventHeader,
    #functionButtons {
        float: none;
        width: 100%;
    }

    .pageHeaderRow #eventHeader,
    .pageHeaderRow #functionButtons {
        width: auto;
    }

    #functionButtons a {
        margin-left: 0;
        margin-right: 10px;
    }
}

#intro {
    margin-bottom: 20px;
}

#intro .button {
    float: right;
    font-size: 12px;
    height: auto;
    line-height: normal;
    margin-left: 10px;
    padding: 10px !important;
}

.boxForm {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    position: relative;
}
