/*!
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

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

/* Theme customization starts here
-------------------------------------------------------------- */
/* Variables and config */
:root {
    --font-sans: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bg-body: #272C28;
    --bg-glass-primary: #673F95;
    --bg-glass-dark: #482c68;
    --bg-glass-light: #8051B6;
    --bg-glass-hover: #b299e9;
    --bg-white: #ffffff;

    --text-white: #ffffff;
    --text-black: #000000;
    --text-muted: rgba(255, 255, 255, 0.5);

    --border-light: rgba(255, 255, 255, 0.3);
    --border-faint: rgba(255, 255, 255, 0.2);
    
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;

    --shadow-glass: 
        rgba(90, 53, 125, 0.3) 0px 50px 100px -20px,
        rgba(46, 26, 74, 0.4) 0px 30px 60px -30px,
        rgba(26, 26, 61, 0.3) 0px -2px 6px 0px inset;
    
    --shadow-text: 1px 1px 1px rgba(0, 0, 0, 0.4);
    --shadow-card: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

/* Global and body */

.glass-border {
	margin-left: 1rem !important;
	margin-right: 1rem !important;
}

.button-container {
    display: flex;
    flex-wrap: wrap;       
    justify-content: space-evenly;
    gap: 20px;
    width: 100%;
    margin: 0;
}

#primary {
	margin-bottom: 0 !important;
}

body {
    background-color: var(--bg-body) !important;
    font-family: var(--font-sans) !important;
    font-feature-settings: "liga" 1, "kern" 1;
    text-shadow: var(--shadow-text) !important;
}

button,
input,
select,
textarea,
table,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans) !important;
}

body p {
    margin-bottom: 0 !important;
    text-shadow: var(--shadow-text) !important;
}

body::before {
    content: "";
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: auto;
    
    width: 100%;
    min-height: 100vh;
    height: 115vh !important;
    height: 115lvh !important;
    
    z-index: -1;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

body.pwa-background-loaded::before {
    background: linear-gradient(
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.2)
        ),
        url('https://botc-tracker.com/wp-content/images/background.jpg') center / cover no-repeat;
    background-color: var(--bg-glass-primary);
}

/* Safari iOS fixed pixel height fix */
@supports (-webkit-touch-callout: none) {
    body::before,
    body.pwa-background-loaded::before {
        top: -100px !important;
        height: calc(100vh + 200px) !important;
        height: calc(100lvh + 200px) !important;
    }

    @media screen and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) {
        body::before { min-height: 920px; }
        body.pwa-background-loaded::before { min-height: 900px; }
    }
    @media screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) {
        body::before,
        body.pwa-background-loaded::before { min-height: 1400px; }
    }
}

/* Typography and notices */

h2 {
    text-shadow: var(--shadow-card) !important;
    margin-top: 0 !important;
}

h3 {
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important;
}

.notice {
    font-weight: bold;
    font-size: 1.25em;
    text-align: center;
    margin-bottom: 2em !important;
    text-decoration: underline;
}

.text-center,
.ad-container,
.dashboard-button-wrapper {
    text-align: center;
}

.highlighted {
    background-color: var(--bg-white);
    color: var(--bg-glass-primary) !important;
    font-weight: bold;
    border-bottom: solid 1px var(--bg-glass-primary) !important;
}

/* WP typography overrides */
.wp-block-heading { margin-top: 0.5rem !important; }
.wp-block-columns,
.kb-btns409_4b24d1-e1,
.kb-btns614_fa7115-a8 { margin-bottom: 1rem !important; }

/* Glass component and header */

.glass,
.glass-left, 
.glass-text,
header,
.button {
    background-color: var(--bg-glass-primary) !important;
    border-radius: var(--radius-lg) !important;
    border: 0;
    box-shadow: var(--shadow-glass);
    color: var(--text-white) !important;
    margin: 0;
    text-decoration: none;
    touch-action: manipulation;
    vertical-align: baseline;
}

.glass { text-align: center; line-height: 2rem; }
.glass-left { text-align: left; line-height: 1.2rem; padding: 1rem; }
.glass-text { line-height: normal; padding: 1rem; }

header {
    justify-content: center;
    letter-spacing: .04em;
    line-height: 2rem !important;
    text-align: center;
    margin: 1rem 1rem 1rem;
}

header p,
header a {
    color: var(--text-white) !important;
    font-family: var(--font-sans) !important;
}

.site-title,
.site-title a,
.site-branding,
.site-branding a,
.site-branding .site-title,
.site-branding .site-description,
.mobile-site-branding,
.mobile-site-branding a {
    font-family: var(--font-sans) !important;
}

.site-title {
	font-size: 2.6rem;
    white-space: nowrap;
}

.button {
    width: 14rem !important;
    font-size: 16px !important;
    box-shadow: var(--shadow-glass) !important;
}

.glass-button-white {
    background-color: var(--bg-white) !important;
    border-radius: var(--radius-lg) !important;
    border: 0;
    box-shadow: var(--shadow-glass) !important;
    color: var(--text-black) !important;
    margin: 0;
    text-decoration: none;
    touch-action: manipulation;
    vertical-align: baseline;
    font-size: 16px !important;
}

/* Login page */

.login h1 a {
    background-image: url('https://botc-tracker.com/wp-content/uploads/2025/06/cropped-clock-tower.png') !important;
    background-size: cover !important;
    background-repeat: no-repeat;
    width: 200px !important;
    height: 200px !important;
    padding-bottom: 30px;
}

.wp-login-register,
.wp-login-lost-password,
#backtoblog a,
.wp-login-log-in {
    color: var(--text-white) !important;
}

.login .language-switcher {
    display: none;
}

.login body::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-height: 100vh !important;
    height: 100vh !important;
    height: 100lvh !important;
    z-index: -1 !important;
    pointer-events: none !important;
    background-color: #26193c !important;
    transition: background-image 0.1s ease-in;
}

.login body.pwa-background-loaded::before {
    background: url('https://botc-tracker.com/wp-content/images/background.jpg') center center / cover no-repeat !important;
    background-color: #26193c !important;
}

.login #loginform,
.login #registerform,
.login #lostpasswordform {
    background-color: var(--bg-glass-primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-lg);
}

.login #wp-submit {
    background-color: var(--bg-white);
    color: var(--text-black);
    border-radius: var(--radius-lg);
    border: none;
}

.login .wp-pwd {
    position: relative;
    display: block;
}

.login .wp-pwd .password-input,
.login .wp-pwd input[type="password"],
.login .wp-pwd input[type="text"] {
    width: 100% !important;
    padding-right: 3.75rem !important;
}

.login .wp-pwd .button.wp-hide-pw {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    width: 2.5rem !important;
    min-width: 2.5rem !important;
    height: 2.5rem;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    z-index: 2;
}

.login .wp-pwd .button.wp-hide-pw .dashicons {
    margin: 0;
}

.login .input {
    border-radius: var(--radius-lg) !important;
    font-size: 1rem !important;
    padding-left: 1rem !important;
}

.login #rememberme {
    border-radius: 50%;
}

.login .dashicons-visibility {
    color: var(--text-black);
}

/* Forms and inputs */

#email-form,
#password-form {
    padding: 0.5em;
    padding-bottom: 1em;
    display: block; 
}

#email-form,
#delete-form {
    padding: 0.5em;
    padding-bottom: 1em;
}

#email-form input,
#password-form input { 
    width: 14em; 
    margin: 0 auto;
}

#email-form input,
#password-form input { width: 14em; }

input, select, textarea {
    color: var(--text-black) !important;
    font-size: 16px;
}

select {
    appearance: auto;
    height: 45px;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

textarea { color: #000; }

#email-form hr,
#password-form hr {
    padding: 0;
    margin: 0.5em;
    color: transparent !important;
    height: 5px !important;
    border: none;
}

/* Log new game inputs */
.log-new-game-table input:not([type="submit"]):not([type="button"]),
.log-new-game-table textarea,
.log-new-game-table select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    outline: none;
}

.botc-order-select {
    width: 200px;
    min-height: 48px;
    padding: 10px 40px 10px 14px;
    border-radius: 999px !important;
    background-color: var(--bg-white) !important;
    color: var(--text-black) !important;
    font-size: 125% !important;
    line-height: 1.2 !important;
    outline: none;
    text-align: center !important;
    text-align-last: center;
    font-weight: bold;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
    text-shadow: none !important;
}

.botc-order-select option {
    background: var(--bg-white);
    color: var(--text-black);
}

.order-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.botc-form-nav-cell {
    text-align: center;
    padding-top: 0 !important;
    padding-bottom: 0;
    vertical-align: top;
}

.botc-form-intro {
    margin-bottom: 1px !important;
    text-align: center;
}

.botc-form-col-label {
    text-align: right;
    width: 45%;
}

.botc-form-col-input {
    text-align: center;
    width: 55%;
}

.botc-form-label-cell {
    text-align: right;
}

.botc-form-field {
    width: 200px !important;
}

.botc-form-submit-cell {
    text-align: center;
}

.botc-character-autocomplete-wrap {
    margin: 0 auto;
    width: 200px;
    position: relative;
}

.botc-character-autocomplete-input {
    display: block;
}

.botc-character-autocomplete-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #0d1519;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 220px;
    overflow: auto;
    z-index: 20;
}

.botc-character-autocomplete-item {
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
}

.botc-character-autocomplete-item:hover,
.botc-character-autocomplete-item.active {
    background: rgba(216, 183, 110, 0.15);
}

.botc-loric-picker-shell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.botc-loric-toggle-button {
    width: 200px !important;
    min-width: 200px;
    align-self: center;
    padding: 0.5rem 1rem !important;
    line-height: 1.3rem !important;
    text-align: center;
    font-weight: 700;
}

.botc-loric-picker {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.8rem;
    text-align: left;
}

.botc-loric-picker-hidden {
    display: none;
}

.botc-loric-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.45rem 0.8rem;
}

.botc-loric-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.botc-loric-option input {
    width: auto !important;
    margin: 0;
    flex: 0 0 auto;
}

.botc-loric-empty {
    margin: 0;
    opacity: 0.85;
}

.entry-content .botc-table-columns {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
}

#botc-order-t1, #botc-order-t2 { width: 45% !important; }
#botc-order-t1 { margin-right: 0.5rem !important; }
#botc-order-t2 { margin-left: 0.5rem !important; }

/* Tables */

.botc-character-stats,
.user-games-table,
.botc-dashboard-table,
.log-new-game-table,
.botc-order-table,
.global-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1em;
    color: var(--text-white);
}

.botc-character-stats th,
.user-games-table th,
.botc-dashboard-table th,
.botc-order-table th {
    line-height: 2rem;
    border-bottom: 2px solid var(--bg-white);
    font-weight: bold;
    text-align: center !important;
}

.botc-character-stats td,
.user-games-table td,
.botc-dashboard-table td,
.botc-order-table td {
    height: 2.5rem;
    border-bottom: 1px solid var(--border-light);
    line-height: 1.2rem;
}

/* Centred cells — .botc-dashboard-table td excluded (uses split alignment) */
.botc-character-stats td,
.user-games-table td,
.botc-order-table td {
    text-align: center !important;
}

.user-games-table td, 
.botc-character-stats td { 
    border-right: 1px solid rgba(255, 255, 255, 0.31); 
}

.user-games-table td:last-child, 
.botc-character-stats td:last-child { 
    border-right: none; 
}

tr:last-child td,
.user-games-table tr:last-child td, 
.botc-character-stats tr:last-child td, 
.botc-order-table tr:last-child td {
    border-bottom: none !important;
}

/* Dashboard table — split alignment (right label | left value) */
.botc-dashboard-table {
    margin-top: 0.2rem !important;
    margin-bottom: 0.2rem !important;
}

.botc-dashboard-table.no-radius,
.botc-dashboard-table.no-radius * {
    box-shadow: none !important;
    filter: none !important;
}

.botc-dashboard-table td { width: 50%; }

.botc-dashboard-table td:first-child { 
    border-right: 1px solid var(--border-light);
    text-align: right !important;
    padding-right: 0.5rem;
    font-weight: bold;
}

.botc-dashboard-table td:last-child {
    text-align: left !important;
    padding-left: 0.5rem;
}

.botc-dashboard-table tr:first-child td {
    border-top: 1px solid var(--border-light);
}
.botc-dashboard-table thead td {
    border: none !important;
    border-top: none !important;
}
.dashboard-last-row-no-border td { border-bottom: none !important; }
.dashboard-last-row-with-border td { border-bottom: 1px solid var(--border-light) !important; }

/* User games table */
.user-games-table {
    max-width: 80em;
    margin: auto;
    box-shadow: 
        rgba(46, 26, 74, 0.4) 0px 30px 60px -30px, 
        rgba(26, 26, 61, 0.3) 0px -2px 6px 0px inset !important;
}
.user-games-table td { min-width: 6rem; }
.user-games-table td img {
    margin-top: 0.55rem;
    display: inline-block;
}
.botc-action-button {
    width: 3rem !important;
    min-width: 3rem;
    height: 3rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
    line-height: 1;
}
.botc-action-icon-image {
  width: 1.8rem;
	margin: auto;
}
.botc-edit-icon-button {
    background-color: #d48404 !important;
}
.botc-delete-button {
    background-color: #bf1f13 !important;
}
.botc-delete-button:hover,
.botc-edit-icon-button:hover {
    filter: brightness(1.1);
}
.botc-game-edit-row td {
    padding: 0 !important;
    border-right: none !important;
    background: rgba(255, 255, 255, 0.08);
}
.botc-game-edit-form {
    padding: 1rem;
}
.botc-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem 1rem;
    text-align: left;
}
.botc-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.botc-edit-field label {
    font-weight: bold;
}
.botc-edit-field-notes {
    grid-column: 1 / -1;
}
.botc-edit-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-black) !important;
    font-size: 16px;
}
.botc-edit-textarea {
    min-height: 7rem;
    resize: vertical;
}
.botc-custom-character-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.botc-custom-character-row-hidden,
.botc-game-edit-row-hidden {
    display: none;
}
.botc-edit-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.botc-save-button {
    background-color: var(--bg-glass-hover) !important;
    color: var(--text-black) !important;
    font-weight: 700;
}
.botc-edit-success-notice {
    max-width: 40rem;
    margin: 0 auto 1rem !important;
    text-align: center;
    font-weight: bold;
}

/* Global table */
.global-table td {
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    width: 20%;
    padding: 10px;
    text-align: center;
}
.global-table td:first-child {
    width: 40%;
    border-left: none;
    text-align: left;
}

.botc-inline-form {
    display: inline;
}

.botc-visually-transparent-underscore {
    color: #ffffff00;
    text-shadow: none;
}

#exportButtonTable {
    width: 100%;
    text-align: center !important;
    margin-bottom: 1rem !important;
}
#exportButtonTable td { width: 50%; }

.table-scroll-wrapper {
    padding-left: 5px;
    padding-right: 5px;
    overflow-x: auto;
    width: 100% !important;
}

/* Character stats table */
.botc-character-stats td { width: 33.33%; }

.botc-dashboard-character-search {
    box-sizing: border-box;
    margin: 0 auto 1rem;
    max-width: 100%;
    width: 100%;
}

.botc-dashboard-character-result {
    display: none;
}

.botc-dashboard-character-result.show {
    display: grid;
}

.botc-dashboard-character-result-image {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 120px;
}

.botc-dashboard-character-result-image img {
    display: block;
    height: auto;
    max-height: 160px;
    max-width: 160px;
    width: auto;
}

.botc-dashboard-character-result-copy {
    display: grid;
    align-content: center;
    gap: 0.7rem;
    min-width: 0;
}

.botc-dashboard-character-result-name {
    margin: 0;
}

.botc-dashboard-character-result-stats {
    display: grid;
    gap: 0.55rem;
}

.botc-dashboard-character-stat-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin: 0;
    padding: 0.7rem 0.9rem;
}

.botc-dashboard-character-stat-row strong {
    font-weight: 700;
    margin: 0;
}

.botc-dashboard-character-stat-row span {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.botc-global-character-search {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.botc-global-character-search h3 {
    text-align: center;
}

.botc-global-character-search-intro {
    margin: 0 0 1rem;
    opacity: 0.85;
    text-align: center;
}

.botc-global-character-search .botc-global-character-result {
    align-items: center;
    column-gap: 1.25rem;
    grid-template-columns: 150px minmax(0, 28rem);
    justify-content: center;
}

.botc-global-character-result .botc-dashboard-character-result-copy {
    max-width: 28rem;
    width: 100%;
}

.botc-global-character-result .botc-dashboard-character-result-image {
    min-height: 150px;
}

.botc-global-character-result .botc-dashboard-character-result-image img {
    max-height: 150px;
    max-width: 150px;
}

.botc-characters-table { border-collapse: collapse; }
.botc-characters-table strong { font-size: 1.2rem; }
.botc-characters-table svg { width: 200px !important; height: 200px !important; }
.botc-characters-table td:first-child { width: 150px !important; }
.botc-characters-table td {
    border-bottom: 1px solid white;
    padding: 5px;
}

/* Tabs, dashboard and graphs */

canvas {
    min-height: 16rem;
    max-width: 100%;
    height: auto !important;
}

#botc-winrate-graph {
    overflow: visible;
    padding-right: 0.25rem;
}

.botc-graph-tabs-wrapper,
.botc-dashboard-tabs-wrapper {
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.botc-graph-tabs,
.botc-dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.botc-graph-tabs:first-child,
.botc-dashboard-tabs:first-child {
    border-top-left-radius: var(--radius-lg);
}
.botc-dashboard-tabs:last-child {
    border-top-right-radius: var(--radius-lg);
}

.botc-dashboard-tab {
    background-color: var(--bg-glass-dark);
    border: none;
    color: #f0eaff;
    font-weight: 600;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
    text-align: center;
    box-shadow: inset 0 -3px 6px rgba(103, 63, 149, 0.6);
    border-radius: 1rem 1rem 0 0 !important;
}

.botc-dashboard-tab:first-child {
    border-top-left-radius: var(--radius-lg) !important;
}

.botc-dashboard-tab:last-child {
    border-top-right-radius: var(--radius-lg) !important;
}

.botc-dashboard-tab:hover:not(.active) {
    background-color: var(--bg-glass-hover);
    color: var(--text-white);
    box-shadow: 0 4px 10px rgba(54, 39, 110, 0.6);
}

.botc-dashboard-tab.active {
    background-color: var(--bg-glass-primary) !important;
    color: var(--text-white) !important;
    font-weight: 700;
    cursor: default;
    box-shadow: none !important;
}

.botc-dashboard-tabs button {
    border-radius: 2rem 2rem 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

#botc-dashboard-container {
    box-shadow: var(--shadow-glass);
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    position: relative;
    top: -5px;
    z-index: -3;
    padding: 0;
}

#botc-charts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-top: -6px !important;
}

#botcWinRateGraph {
	margin-bottom: 10px;
}

.botc-dashboard-stats {
    text-align: center;
}

.botc-dashboard-content-hidden {
    display: none;
}

.chart-wrapper-small {
    width: 220px;
    max-width: 100%;
}

.chart-wrapper-large {
    width: 440px;
    max-width: 100%;
}

.botc-chart-canvas {
    min-height: 0 !important;
}

.botc-chart-canvas-pie {
    height: 220px !important;
}

.botc-chart-canvas-line {
    height: 200px !important;
}

/* SVG, icons and images */

/* SVG, icons and images */
.botc-svg-container {
    max-width: 190px;
    max-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botc-dashboard-carousel {
    margin-top: 6px !important;
    margin-bottom: -10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.botc-dashboard-carousel::-webkit-scrollbar {
    display: none;
}

.botc-dashboard-carousel-track {
    display: inline-flex;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: max-content;
    padding: 0 0.5rem;
}

.botc-svg-container-top-three {
    max-width: 140px;
    max-height: 140px;
    margin: auto;
}

.botc-dashboard-character-card {
    flex: 0 0 auto;
    width: 140px;
    text-align: center;
}

.botc-dashboard-character-card-missing {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botc-dashboard-top-three-image-wrap {
    width: 140px;
    height: 140px;
    max-width: none;
    max-height: none;
    margin: 0 auto !important;
}

.botc-dashboard-top-three-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
}

#svg-stats { padding-top: 0.5rem; }
#inner-wrap svg {
    border-radius: 100%;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.3);
}
.arrow { margin-bottom: 0 !important; }

.character-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.character-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    flex-shrink: 0;
}
.character-name {
    flex: 1;
    min-width: 0;
}

/* Global stats */

.botc-global-total-card,
.botc-global-empty-card {
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.botc-global-card-title {
    margin: 0;
}

.botc-global-total-value {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

.botc-global-section-title,
.botc-global-table-title {
    text-align: center;
}

.botc-global-section-title {
    margin-top: 0;
}

.botc-global-table-title {
    margin-bottom: 1rem;
}

.botc-global-alignment-columns {
    display: flex;
    width: 100%;
    justify-content: space-around;
    text-align: center;
    align-items: flex-end;
}

.botc-global-alignment-icon {
    width: 150px;
    height: auto;
    margin-bottom: 10px;
}

.botc-global-alignment-rate {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
}

.botc-global-alignment-label {
    margin: 5px 0 0;
    font-size: 0.85em;
    opacity: 0.7;
    text-transform: uppercase;
}

.botc-global-stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-radius: var(--radius-md);
    justify-content: center;
    margin: 0 auto;
}

.botc-global-stat-image-wrap {
    width: 160px;
    flex-shrink: 0;
}

.botc-global-stat-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.botc-global-stat-line {
    margin: 0;
}

.botc-global-stat-name {
    font-size: 1.5em;
}

.botc-global-stats-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.botc-global-stats-section {
    min-width: 0;
    overflow-x: auto;
}

.botc-global-stats-section-spaced {
    margin-bottom: 0;
}

.botc-global-stats-wrapper .global-table {
    width: 100%;
}

.botc-global-stats-wrapper .character-image {
    width: clamp(72px, 8vw, 120px);
    height: clamp(72px, 8vw, 120px);
}

.botc-global-mobile-win-rate,
.botc-global-mobile-character-name {
    display: none;
}

/* Characters browser */

.botc-characters-browser {
    display: grid;
    gap: 0;
}

.botc-characters-browser h2,
.botc-characters-browser h3,
.botc-characters-browser p {
    color: inherit;
    margin-top: 0;
}

.cb-panel {
    padding: 1.3rem;
}

.cb-search-shell {
    margin-bottom: 1rem;
    padding: 1rem;
}

.cb-search-shell h3 {
    margin-bottom: 0.3rem;
}

.cb-controls {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 220px 220px;
    align-items: end;
    margin-bottom: 1rem;
}

.cb-field {
    display: grid;
    gap: 0.35rem;
}

.cb-label {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    opacity: 0.82;
    text-transform: uppercase;
}

.cb-select,
.cb-input {
    width: 100%;
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1.35;
}

.cb-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    padding-right: 2.8rem;
}

.cb-select-wrap {
    position: relative;
}

.cb-select-wrap::after {
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: '';
    display: block;
    height: 0.55rem;
    pointer-events: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-70%) rotate(45deg);
    width: 0.55rem;
}

.cb-search {
    position: relative;
}

.cb-suggestions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #0d1519;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 240px;
    overflow: auto;
    z-index: 20;
}

.cb-suggestion {
    cursor: pointer;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
}

.cb-suggestion:hover,
.cb-suggestion.active {
    background: rgba(216, 183, 110, 0.15);
}

.cb-empty,
.cb-search-empty {
    display: none;
    opacity: 0.85;
    text-align: center;
}

.cb-empty {
    margin: 0.25rem 0 0;
}

.cb-search-empty {
    margin: 0.75rem 0 0;
}

.cb-empty.show,
.cb-search-empty.show {
    display: block;
}

.cb-search-card {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    gap: 1rem;
    grid-template-columns: 110px minmax(0, 1fr);
    margin-top: 1rem;
    padding-top: 1rem;
}

.cb-search-card.show {
    display: grid;
}

.cb-search-card-image,
.cb-item-image {
    align-items: center;
    display: flex;
    justify-content: center;
}

.cb-search-card-image img,
.cb-item-image img {
    display: block;
    height: auto;
    max-height: 96px;
    max-width: 96px;
    width: auto;
}

.cb-search-card-name,
.cb-item-name {
    margin: 0 0 0.25rem;
}

.cb-search-card-meta,
.cb-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.cb-groups {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.cb-group {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 1rem;
}

.cb-group-title {
    margin-bottom: 0.75rem;
}

.cb-list {
    display: grid;
    gap: 0.8rem;
}

.cb-item {
    align-items: start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 1rem;
}

.cb-pill {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
}

.cb-item-ability {
    font-size: 1.02rem;
    line-height: 1.45;
    margin: 0;
}

/* Miscellaneous */

.botc-share-button-wrap {
    text-align: center;
}

.botc-error-notice {
    color: red;
    text-align: center;
}

.botc-wrapped-card {
    text-align: center;
}

.botc-wrapped-images {
    margin-bottom: 20px;
}

.botc-storyteller-image-cell {
    text-align: center;
    padding: 10px;
}

.botc-storyteller-image {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Miscellaneous and drawers */

.drawer-inner {
    position: relative;
    background: var(--bg-glass-primary) !important;
    color: var(--text-white) !important;
    width: 16rem !important;
    height: auto !important;
}

.drawer-inner::before {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.content-card {
    background-color: var(--bg-glass-light);
    padding: 10px;
    box-shadow: var(--shadow-card);
    width: 100% !important;
}

.botc-global-stats-section { padding-top: 12px; }
.log-new-game-table td { padding: 8px; }

#primary { margin-top: 10px; }
.site-footer { background: none !important; }

/* FIXED: Changed margin from '0' to '0 auto' to restore centering */
.content-container,
.site-container {
    margin: 0 auto !important; 
    width: 100% !important;
}

/* Media queries */

.adsense-mobile { display: none; }
.adsense-desktop { display: none; }

@media (max-width: 767px) {
    .adsense-mobile { display: inline-block; }
}
@media (min-width: 768px) {
    .adsense-desktop { display: inline-block; }
}

@media screen and (max-width: 768px) {
    .botc-global-stats-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .botc-global-stats-section-spaced {
        margin-bottom: 0;
    }

    .botc-global-stats-wrapper .botc-global-table-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .botc-global-stats-wrapper .global-table thead {
        display: none;
    }

    .botc-global-stats-wrapper .global-table th:nth-child(2),
    .botc-global-stats-wrapper .global-table th:nth-child(3),
    .botc-global-stats-wrapper .global-table th:nth-child(4),
    .botc-global-stats-wrapper .global-table td:nth-child(2),
    .botc-global-stats-wrapper .global-table td:nth-child(3),
    .botc-global-stats-wrapper .global-table td:nth-child(4) {
        display: none;
    }

    .botc-global-stats-wrapper .global-table td:first-child {
        width: 100%;
        text-align: center;
    }

    .botc-global-stats-wrapper .character-info {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        text-align: center;
    }

    .botc-global-stats-wrapper .character-image {
        width: clamp(54px, 24vw, 96px);
        height: clamp(54px, 24vw, 96px);
    }

    .botc-global-mobile-win-rate {
        display: block;
        font-weight: 700;
        line-height: 1.1;
    }

    .botc-global-mobile-character-name {
        display: block;
        font-size: 0.75rem;
        line-height: 1.15;
    }

    .character-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .character-image {
        width: 150px;
        height: 150px;
    }
    .global-table td,
    .global-table th {
        padding: 5px;
    }

    .botc-global-stat-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .cb-controls {
        grid-template-columns: 1fr;
    }

    .cb-search-card,
    .cb-item {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .botc-global-character-search .botc-global-character-result {
        grid-template-columns: minmax(0, 1fr);
    }

    .cb-search-card-meta,
    .cb-item-meta {
        justify-content: center;
    }

    .botc-dashboard-character-stat-row {
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
    }
}

/* Force mobile menu, hide desktop nav */
@media (min-width: 1px) {
    #main-header .header-navigation {
        display: none !important;
    }
    
    .site-header-wrap:not(#mobile-header) {
        display: none !important;
    }
    
    #mobile-header {
        display: block !important;
    }
    
    .mobile-toggle-open-container {
        display: flex !important;
    }
}

/* Post pages */

.entry-header, h1{
	color: white !important;
	padding: 0.2rem;
	padding-left: 1rem;
	padding-right: 1rem;
}

.post-top-featured {
	border-radius: 16px;
	box-shadow: var(--shadow-glass) !important;
}
.botc-share-panel-copy,
.botc-public-share-hero {
  margin: 0 auto 1.5rem;
  max-width: 980px;
  padding: 0.95rem 1.15rem;
}

.botc-public-share-cta {
  margin: 1.5rem auto;
  max-width: 980px;
  padding-top: 0;
}

.botc-public-share-cta a {
  color: var(--text-white) !important;
  font-weight: 700;
}

.botc-public-share-cta h3,
.botc-public-share-cta-link {
  text-align: center;
}

.botc-public-share-cta h3 {
  margin-bottom: 0.5rem;
}

.botc-share-panel-shell {
  margin: 0 auto 1.5rem;
  max-width: 980px;
}

.botc-share-panel-toggle-wrap {
  text-align: center;
}

.botc-share-panel-title,
.botc-public-share-title {
  margin: 0;
}

.botc-share-panel-toggle {
  text-align: center;
}

.botc-share-panel-toggle:hover,
.botc-share-panel-toggle:focus,
.botc-share-panel-toggle:focus-visible,
.botc-share-panel-toggle:active {
  color: var(--text-white) !important;
}

.botc-share-panel-title {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-shadow: inherit;
}

.botc-share-panel-text,
.botc-public-share-text,
.botc-public-share-kicker {
  margin: 0;
}

.botc-share-panel-copy {
  margin-top: 0.8rem;
}

.botc-share-panel-copy-hidden {
  display: none;
}

.botc-public-share-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.botc-share-notice {
  margin-top: 0.8rem;
  padding: 0.7rem 0.95rem;
  border-radius: 1rem;
  background: rgba(44, 26, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-white);
  line-height: 1.35;
  text-align: center;
}

.botc-share-notice-error {
  background: rgba(120, 24, 24, 0.45);
  border-color: rgba(255, 180, 180, 0.28);
}

.botc-share-link-label {
  display: block;
  margin-top: 0.85rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.botc-share-link-row {
  margin-bottom: 0.8rem;
}

.botc-share-link-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-black) !important;
  font-size: 16px;
  line-height: 1.2;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.botc-share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  align-items: stretch;
}

.botc-share-form {
  display: flex;
  flex: 1 1 220px;
  margin: 0;
  max-width: 240px;
}

.botc-share-action-button {
  width: 100%;
  min-width: 180px;
  max-width: 240px;
  min-height: 2.65rem;
  padding: 0.58rem 1rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.botc-share-actions > .botc-share-action-button {
  flex: 1 1 220px;
}

@media (max-width: 640px) {
  .botc-share-panel-copy,
  .botc-public-share-hero {
    padding: 0.9rem;
  }

  .botc-share-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .botc-share-form,
  .botc-share-action-button,
  .botc-share-actions > .botc-share-action-button {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}
/* Clean glass border refresh
-------------------------------------------------------------- */
:root {
    --radius-lg: 1.35rem;
    --shadow-glass:
        0 18px 44px rgba(0, 0, 0, 0.3),
        0 8px 18px rgba(46, 26, 74, 0.2);
}

.glass,
.glass-left,
.glass-text,
header,
.site-header-wrap,
#mobile-header,
.drawer-inner,
.button,
.content-card,
.botc-public-share-hero,
.botc-public-share-cta,
.botc-share-panel-copy,
.login #loginform,
.login #registerform,
.login #lostpasswordform {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-glass) !important;
}

.button,
.glass-button-white,
button.glass,
.mobile-toggle-open,
.mobile-toggle-close,
.drawer-toggle,
.menu-toggle-open,
.menu-toggle-close,
.wp-block-button__link {
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

.botc-public-share-cta {
    padding-top: 0 !important;
}

.botc-public-share-cta h3,
.botc-public-share-cta-link {
    text-align: center;
}

.mobile-toggle-close,
.menu-toggle-close,
.drawer-toggle.close,
.popup-drawer .drawer-toggle {
    border: 0 !important;
    box-shadow: none !important;
}

.botc-character-stats th,
.botc-character-stats td,
.user-games-table th,
.user-games-table td,
.botc-dashboard-table th,
.botc-dashboard-table td,
.log-new-game-table th,
.log-new-game-table td,
.botc-order-table th,
.botc-order-table td,
.global-table th,
.global-table td {
    border: 0 !important;
}

.botc-character-stats,
.user-games-table,
.botc-dashboard-table,
.log-new-game-table,
.botc-order-table,
.global-table {
    overflow: hidden;
}

.botc-character-stats tr:nth-child(even) > th,
.botc-character-stats tr:nth-child(even) > td,
.user-games-table tr:nth-child(even) > th,
.user-games-table tr:nth-child(even) > td,
.botc-dashboard-table tr:nth-child(even) > th,
.botc-dashboard-table tr:nth-child(even) > td,
.log-new-game-table tr:nth-child(even) > th,
.log-new-game-table tr:nth-child(even) > td,
.botc-order-table tr:nth-child(even) > th,
.botc-order-table tr:nth-child(even) > td,
.global-table tr:nth-child(even) > th,
.global-table tr:nth-child(even) > td {
    background-color: rgba(255, 255, 255, 0.045);
}

.botc-character-stats tr:nth-child(odd) > th,
.botc-character-stats tr:nth-child(odd) > td,
.user-games-table tr:nth-child(odd) > th,
.user-games-table tr:nth-child(odd) > td,
.botc-dashboard-table tr:nth-child(odd) > th,
.botc-dashboard-table tr:nth-child(odd) > td,
.log-new-game-table tr:nth-child(odd) > th,
.log-new-game-table tr:nth-child(odd) > td,
.botc-order-table tr:nth-child(odd) > th,
.botc-order-table tr:nth-child(odd) > td,
.global-table tr:nth-child(odd) > th,
.global-table tr:nth-child(odd) > td {
    background-color: rgba(255, 255, 255, 0.018);
}

.user-games-table thead th,
.user-games-table thead td,
.botc-character-stats thead th,
.botc-character-stats thead td,
.botc-dashboard-table thead th,
.botc-dashboard-table thead td,
.botc-order-table thead th,
.botc-order-table thead td,
.global-table thead th,
.global-table thead td {
    background-color: rgba(34, 22, 48, 0.62);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.user-games-table tbody > tr:not(.botc-game-edit-row) > th,
.user-games-table tbody > tr:not(.botc-game-edit-row) > td {
    background-color: rgba(255, 255, 255, 0.018);
}

.user-games-table tbody > tr:not(.botc-game-edit-row):nth-child(4n+3) > th,
.user-games-table tbody > tr:not(.botc-game-edit-row):nth-child(4n+3) > td {
    background-color: rgba(255, 255, 255, 0.045);
}

.user-games-table tbody > tr.botc-game-edit-row > td {
    background-color: rgba(255, 255, 255, 0.035);
}

.botc-order-table tbody td.highlighted {
    background-color: var(--bg-white) !important;
    color: var(--bg-glass-primary) !important;
    font-weight: bold;
}

.botc-order-select.glass {
    background-color: var(--bg-white) !important;
    border-radius: 999px !important;
    color: var(--text-black) !important;
    line-height: 1.2 !important;
    padding-bottom: 10px;
    padding-top: 10px;
    text-shadow: none !important;
}
