:root {
    --fieldset-color: #f1f4f9;
}

/* header */
a img {
    border: 0;
}
.header {
    margin: 0 0 30px 0;

    background: #E5ECFB;
    background: -webkit-gradient(linear, left top, left bottom, from(#E8EEFC), to(#D7DEEA));
    background: -moz-linear-gradient(top,  #E8EEFC,  #D7DEEA);
    background: linear-gradient(top,  #E8EEFC,  #D7DEEA);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#E8EEFC', endColorstr='#D7DEEA');

    border-bottom: 1px solid #AAA;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6), 0px 2px 2px rgba(0, 0, 0, .15);
    min-height: 50px;
}
.header-inner {
    max-width: 605px;
    margin: 0 auto;
}
.nav, .nav li, .nav-play, .nav-play li {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    float: left;
}
.nav {
    padding: 15px 6px 15px 6px;
}
.header .nav {
    padding: 15px 0 15px 155px;
}
.header .nav-play {
    padding: 15px 0 15px 10px;
}
.nav .button {
    position: relative;
    padding: 5px 10px;
    margin: 0 -1px 0 0;
    border-radius: 0;
}
.nav .button img {
    position: absolute;
    top: -8px;
    left: -150px;
}
.nav .button.cur,
.nav .button.cur:hover {
    color: #777777;
    background: #f8f8f8;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.nav .button.cur:hover {
    border: solid 1px #888888;
}
.nav .button:hover {
    z-index: 10;
}
.nav .button.nav-first {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.nav .button.nav-last {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}
.button {
    outline: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255,255,255,.4);
    border-radius: 5px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);
    white-space: nowrap;

    /* default colors */
    color: #222222;
    border: solid 1px #AAAAAA;
    background: #e3e3e3;
    background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
    background: -moz-linear-gradient(top,  #f6f6f6,  #e3e3e3);
    background: linear-gradient(top,  #f6f6f6,  #e3e3e3);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3');
}
.button:hover {
    background: #cfcfcf;
    background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#cfcfcf));
    background: -moz-linear-gradient(top,  #f2f2f2,  #cfcfcf);
    background: linear-gradient(top,  #f2f2f2,  #cfcfcf);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#cfcfcf');
    border-color: #606060;
}
.button:active {
    background: -webkit-gradient(linear, left top, left bottom, from(#cfcfcf), to(#f2f2f2));
    background: -moz-linear-gradient(top,  #cfcfcf,  #f2f2f2);
    background: linear-gradient(top,  #cfcfcf,  #f2f2f2);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf', endColorstr='#f2f2f2');
}

.greenbutton {
    background: hsl(100,30%,93%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,97%)), to(hsl(100,30%,84%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,97%),  hsl(100,30%,84%));
    background: linear-gradient(top,  hsl(100,30%,97%),  hsl(100,30%,84%));
    border-color: hsl(100,30%,70%);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3');
}
.greenbutton:hover {
    background: hsl(100,30%,87%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,94%)), to(hsl(100,30%,77%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,94%),  hsl(100,30%,77%));
    background: linear-gradient(top,  hsl(100,30%,94%),  hsl(100,30%,77%));
    border-color: hsl(100,30%,41%);
}
.greenbutton:active {
    background: hsl(100,30%,77%);
    background: -webkit-gradient(linear, left top, left bottom, from(hsl(100,30%,77%)), to(hsl(100,30%,83%)));
    background: -moz-linear-gradient(top,  hsl(100,30%,77%),  hsl(100,30%,83%));
    background: linear-gradient(top,  hsl(100,30%,77%),  hsl(100,30%,83%));
    border-color: hsl(100,30%,41%);
}

/* general page styling */
html, body {
    font: 10pt Verdana, sans-serif;
    background-color: white;
    color: black;
    margin: 0;
    padding: 0;
    min-width: 100em;
}
body {
    overflow-y: scroll;
}
.wrapper {
    padding: 0 1em;
    max-width: 1250px;
    margin: 30px auto 0 auto;
}
.credits {
    clear: both;
    padding: 20px;
    max-width: 1250px;
    margin: 0px auto;
}
div.wrapper > div > span {
    padding-right: 5px;
}
fieldset {
    float: left;
    background-color: var(--fieldset-color);
    border: 1px solid #AAAAAA;
    border-radius: 10px;
}
legend {
    font-weight: bold;
    text-align: center;
}
th, td {
    padding: 0;
}
th {
    font-size: 0.8em;
}
.title-text {
    font-weight: bold;
    font-size: 1.5em;
    margin: 0.5em 1em 0.5em 0;
}
.update-text {
    font-weight: bold;
    font-size: 1.5em;
    margin: 0.5em 1em 0.5em 2em;
    color: red;
    cursor: pointer;
}
.big-text {
    text-align: left;
    font-weight: bold;
    font-size: 1.1em;
    margin: 0.5em 0;
    position: relative;
}
.big-text #mainResult:hover {  /* indicates the presence of click-to-copy function */
    cursor: pointer;
    opacity: 0.7;
}
#tooltipText {
    position: absolute;
    left: 42%;
    top: -170%;
    font-size: 0.8em;
    visibility: hidden;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 5px;
    font-weight: normal;
}
#tooltipText::after {
    position: absolute;
    left: 45%;
    top: 100%;
    content: '';
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.7);
}
.small-text {
    font-size: 0.8em;
}
.panel {
    float: left;
    display: inline-block; /* required for honkaculate to work */
}
.poke-info, .team-box, .enemy {
    width: 30em;
}
.field-info, .poke-import {
    text-align: center;
    width: 27.5em;
}

#holder-2 tr {
    white-space: nowrap;
}

/* general button styling */
.btn {
    text-align: center;
    border: solid 1px #aaaaaa;
    padding: 4px 4px;
    position: relative;
    cursor: pointer;
    color: #555555;
    background: #e9e9e9;
    margin: -1px -3px 0;
    display: inline-block;
    width: 5em;
    border-radius: 8px;
    user-select: none;
}
.btn-wide {
    width: 7em;
}
.btn-xwide {
    width: 8em;
}
.btn-xxwide {
    width: 9em;
}
.btn-xxxwide {
    width: 10em;
}
.btn-small {
    width: 4em;
}
.btn-smaller {
    width: 3em;
}
.btn-xsmall {
    width: 1em;
}
.btn-left {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-right {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.btn-top {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-bottom {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.btn-mid {
    border-radius: 0;
}
.visually-hidden:focus + .btn, /* Add visual indication when focusing on visually hidden elements */
.btn:hover {
    z-index: 10;
    border-color: #777777;
    background: #e3e3e3;
}
.visually-hidden:checked + .btn {
    font-weight: bold;
    color: #111111;
    background: #f5f5f5;
}
.visually-hidden[type="radio"]:checked + .btn {
    cursor: default;
}

/* Hide element visually, but not from screen readers. See http://adrianroselli.com/2017/05/under-engineered-custom-radio-buttons-and-checkboxen.html */
.visually-hidden {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    top: auto;
    white-space: nowrap; /* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */
}

.visually-hidden:disabled + .btn {
    color: #999999;
}
.btn-group {
    display: inline-block;
    width: 100%;
}
.left {
    float: left;
}
.right {
    float: right;
}
.locked-move:checked + .btn {
    background: #ffff99;
}

.settings {
    float: right;
}

.genSelection, .notationSelection, .modeSelection {
    display: inline-block;
    position: relative;
    top: -8px;
}

/* settings */

#popup-container {
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(96, 96, 96, 0.4);
    position: fixed;
    z-index: 1;

    fieldset {
        margin: 10% auto 0;
        float: none;
    }
    .edit-encounter-popup {
        width: 350px;

        label {
            width: 7em;
            display: inline-block;
        }
        .edit-species-selector {
            width: 100%;
        }
        .edit-nickname {
            margin-top: 6px;
        }
        .edit-nature-selector, .edit-ability-selector, .edit-item-selector, .edit-location-selector {
            width: 12em;
        }
        .edit-move-selector {
            width: 49%;
            margin-bottom: 2px;
            margin-top: 2px;
            font-size: 0.9em;
        }
        .buttons {
            display: inline-block;
            width: 100%;
            text-align: center;

            #cancel-edit {
                margin-right: 20px;
            }
        }
    }
}

/* header */
.move-result-group {
    min-width: 50em;
    margin: 1em 0 11.5em;
}
.move-result-subgroup {
    float: left;
    width: 50%;
}
.move-result-group .btn {
    margin-right: 1em;
}
.main-result-group {
    margin: 2em 0 1em;
}
.result-move-header {
    font-size: 0.8em;
    font-weight: bold;
    margin: 0 0 5px;
}

/* pokemon info */
.poke-info label {
    display: inline-block;
    width: 6em;
}
.top label, .info-selectors label {
    display: inline-block;
    width: 5em;
}
.poke-info input:not([type]), .poke-info input[type="text"], .poke-info span {
    display: inline-block;
    width: 2.5em;
}
.poke-info input[type="number"] {
    display: inline-block;
    width: 3em;
}
.info-group {
    margin: 1em 0;
}
.dex-entry {
    float: right;
}
.boosted {
    color: #FF5A5A;
}
.nerfed {
    color: #009FFF;
}
.speed-info {
    width: 1em !important;
    img {
        width: 1em;
        transform: translate(0px, -1px);
    }
}
.stat-changer {
    width: 22px;
    margin-right: 2px;
}
.set-selector {
    width: 100%;
}
.info-selectors select {
    width: 12em;
}
select.toxic-counter {
    width: 5.5em;
}
.move-selector, .move-bp, .move-type, .move-cat, .move-hits {
    font-size: 0.9em;
}
.move-selector {
    width: 11.5em;
}
.poke-info input.move-bp {
    width: 2em;
}
.move-type {
    width: 5.5em;
}
.move-cat {
    width: 6em;
}
.move-hits {
    width: 4.5em;
}
.poke-info .crit-btn {
    font-size: 0.8em;
    width: 2.5em;
    height: 1em;
    padding: 3px 3px;
    margin: 0px 1px;
}
.poke-info .z-btn {
    font-size: 0.8em;
    width: 1.5em;
    height: 1em;
    padding: 3px 3px;
    margin-right: 1px;
}
.poke-info .max-btn {
	font-size: 0.8em;
	width: 2.5em;
	height: 1em;
	padding: 3px 3px;
}
.poke-info .stellar-btn {
   font-size: 0.8em;
   width: 3.5em;
   height: 1em;
   padding: 3px 3px;
}


/* field info */
.field-info .btn {
    font-size: 0.8em;
}
table.field {
    width: 100%;
}

[hidden], .hide {
    display: none !important;
}

/* pokemon containers */
.teambox-searchbar {
    width: 373px;
    padding: 5px;
    padding-left: 10px;
    margin: 5px;
    border: 1px solid #AAAAAA;
    border-radius: 5px;
}

.mon-container {
    min-height: 50px;
}
.mon-container.over {
    background-color: #373232;
    .pokemon-icon {
        border-color: #373232;
    }
    .pokemon-icon:not(:hover) {
        outline-color: #373232;
    }
}
.pokemon-icon {
    height: 32px;
    width: 32px;
    margin: 0.4em 0.6em;
    padding: 0px 6px;
    outline: 2px solid var(--fieldset-color);
    border: 3px solid var(--fieldset-color);
    border-radius: 20%;
}
.pokemon-icon:hover {
    cursor: pointer;
    outline-color: white;
}
/* Yellow border for the currently selected/active Pokémon on each side */
.pokemon-icon.active-mon {
    outline: 2px solid gold;
    border-color: gold;
}
.pokemon-icon.active-mon:hover {
    outline-color: white;
}
/* Turquoise border for predicted switch-in Pokémon */
.pokemon-icon.switch-in-highlight {
    outline: 2px solid #40E0D0;
    border-color: #40E0D0;
}
.pokemon-icon.switch-in-highlight:hover {
    outline-color: white;
}
/* Yellow overrides switch-in on click */
.pokemon-icon.active-mon.switch-in-highlight {
    outline: 2px solid gold;
    border-color: gold;
}
.pokemon-icon.active-mon.switch-in-highlight:hover {
    outline-color: white;
}

/* Switch-in borders legend */
.switch-in-legend {
    font-size: 0.75em;
    margin-top: 6px;
    padding: 4px 6px;
    border: 1px solid #888;
    border-radius: 4px;
    display: inline-block;
}
.switch-in-legend .legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}
.switch-in-legend .legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 3px;
    border: 2px solid;
}
.switch-in-legend .swatch-hover {
    border-color: white;
    background: transparent;
}
.switch-in-legend .swatch-active {
    border-color: gold;
    background: transparent;
}
.switch-in-legend .swatch-switchin {
    border-color: #40E0D0;
    background: transparent;
}
.switch-in-legend .swatch-fainted {
    border-color: red;
    background: transparent;
}

/* Fainted checkbox overlay on enemy icons */
.pokemon-icon-wrapper {
    position: relative;
    display: inline-block;
}
.pokemon-icon-wrapper .fainted-checkbox {
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    z-index: 2;
    accent-color: red;
}
.fainted-checkboxes-visible .fainted-checkbox {
    display: block;
}
.pokemon-icon-wrapper.fainted .pokemon-icon {
    outline: 2px solid red;
    border-color: red;
    opacity: 0.5;
}

.switch-in-note {
    font-size: 0.7em;
    margin-top: 4px;
    opacity: 0.7;
    font-style: italic;
}
.switch-in-toggle-area {
    margin: 6px 0;
    text-align: center;
}

.speed-faster {
    border-color: aqua;
}
.speed-slower {
    border-color: black;
}
.speed-tie {
    border-color: blueviolet;
}
.damage-ol {
    background: linear-gradient(90deg, lime 50%, var(--fieldset-color) 50%);
}
.damage-ol-pr {
    background: linear-gradient(90deg, lime 50%, orange 50%);
}
.damage-ol-or {
    background: linear-gradient(90deg, lime 50%, red 50%);
}
.damage-pl {
    background: linear-gradient(90deg, yellow 50%, var(--fieldset-color) 50%);
}
.damage-pl-pr {
    background: linear-gradient(90deg, yellow 50%, orange 50%);
}
.damage-pl-or {
    background: linear-gradient(90deg, yellow 50%, red 50%);
}
.damage-or {
    background: linear-gradient(90deg, var(--fieldset-color) 50%, red 50%);
}
.damage-pr {
    background: linear-gradient(90deg, var(--fieldset-color) 50%, orange 50%);
}

/* switch ai */
.switch-ai {
    .switching-from {
        display: block;
        width: 100%;
        height: 50px;
        .pokemon-icon {
            margin: 0.4em;
        }
        .baiting {
            display: inline-block;
            width: 60%;
            margin-left: 4px;
            display: none; /* Temp, until switch AI is in */
        }
        .xp {
            display: inline-block;
            width: 20%;
            text-align: right;
            text-align: left; /* Temp, until switch AI is in */
        }
    }
    .switching-from.dead {
        .pokemon-icon {
            border-color: red;
        }
    }
}


/* select2 overrides */
.select2-container .select2-choice > .select2-chosen {
    width: 100%;
}

.select2-chosen {
	word-wrap: break-word;
	text-overflow: inherit;
	white-space: normal !important;
}

.small-select.select2-container .select2-choice {
    font-size: 0.9em;
    height: 18px;
    line-height: 18px;
}
.small-select.select2-container .select2-choice .select2-arrow b {
    background-position: 0 -4px;
}
.small-select.select2-dropdown-open .select2-choice .select2-arrow b {
    background-position: -18px -4px;
}

/* Bootstrap */
.panel-group > .panel {
    clear: left;
}

/* ColVis */
.clear {
  clear: right;
}

.import-team-text {
    min-width: 27em;
    min-height: 10em;
    resize: vertical;
}

.hpbar {
    height: 4px;
    border-style: solid;
    border-top-width: 2px;
    border-right-width: 1px;
    border-bottom-width: 2px;
    border-left-width: 0.5px;
    border-radius: 3px;
}

.hpbar.hp-green {
    border-top-color: #00dd60;
    background-color: green;
    border-bottom-color: #007734;
    border-right-color: #007734;
}

.hpbar.hp-yellow {
    border-top-color: #f8e379;
    background-color: #f5d538;
    border-bottom-color: #be9f0a;
    border-right-color:#be9f0a;
}

.hpbar.hp-red {
    border-top-color: #f37f67;
    background-color: #ee4928;
    border-bottom-color: #a3260d;
    border-right-color: #a3260d;
}

.pool {
    padding: 15px 0;
}
.ability-pool, .move-pool  {
    padding-bottom: 5px;
}
.extraSetAbilities,
.extraSetItems,
.extraSetMoves {
    width: 100%;
}
.ai-flags-box {
    margin: 4px 0 2px 0;
    padding: 4px 7px;
    border: 1px solid #888;
    border-radius: 3px;
    font-size: 0.8em;
    line-height: 1.6;
}
.ai-flags-box .ai-flags-label {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: 0.95em;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ai-flags-box .ai-flag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 6px;
}
.ai-flag-item {
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}
.ai-flag-item.flag-on {
    background: #2a6496;
    color: #fff;
}
.ai-flag-item.flag-off {
    opacity: 0.35;
}
.ai-flags-summary {
    margin-top: 3px;
    font-size: 0.88em;
    font-style: italic;
    opacity: 0.82;
    line-height: 1.4;
    color: #cde;
}

.ai-move-prediction {
    margin: 6px 0 2px 0;
    padding: 5px 8px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.85em;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.15);
}
.ai-move-prediction .pred-header {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 0.95em;
    color: #40E0D0;
}
.ai-move-prediction .pred-mon {
    font-weight: bold;
}
.ai-move-prediction .pred-move {
    color: #FFD700;
    font-weight: bold;
}
.ai-move-prediction .pred-score {
    opacity: 0.7;
    font-size: 0.9em;
}
.ai-move-prediction .pred-breakdown {
    font-size: 0.85em;
    opacity: 0.6;
    margin-left: 8px;
}
.ai-move-prediction .pred-moves-list {
    margin: 2px 0 0 10px;
}
.ai-move-prediction .pred-moves-list .pred-move-item {
    display: flex;
    gap: 6px;
    align-items: baseline;
}
.ai-move-prediction .pred-move-item .score-bar {
    display: inline-block;
    height: 8px;
    background: #2a6496;
    border-radius: 2px;
    min-width: 2px;
    vertical-align: middle;
}
.ai-move-prediction .pred-move-item.pred-best .score-bar {
    background: #FFD700;
}

.flex-parent {
	display: flex;
}
