body {
    background-color: #505050;
    color: white;
    font-size: 1.5em;
}

drinker {
    display: block;
}

.drinker {
    border: 2px solid black;
    border-radius: 5px;
    color: black;
    margin-bottom: 20px;
    font-size: 0.8em;;
}

.drinker-ended {
    cursor: default;
}

/* Chart.js sizes the canvas from this container, so the container must not take its size from the canvas. */
.drinker-graph {
    position: relative;
}

.drinker-graph canvas {
    max-width: 100%;
}

/* On phones Bootstrap drops the tile's side padding; the y labels keep the left edge clear. */
@media (max-width: 767px) {
    .drinker-graph {
        margin-right: 10px;
    }
}

.drinker-overlay {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 1000;
    height: 100%;
    width: 100%;

    background-color: black;
    border: 2px solid white;
    border-radius: 5px;
    color: white;

    text-align: center;
}

/* iOS Safari zooms the page in on focusing a field under 16px and never zooms back out. */
@media (max-width: 767px) {
    select,
    textarea,
    input[type="text"],
    input[type="email"],
    input[type="number"] {
        font-size: 16px;
        height: auto;
    }
}

form.edit-drink {
    margin-left: 0px;
    margin-bottom: 0px;
    text-align: center;
}

.edit-drink-label {
    float: left;
    margin-left: 10px;
    margin-right: 10px;
}

.edit-drink-input {
    float: left;
    width: auto;
}

.party {
    border: 2px solid black;
    border-radius: 5px;
    color: black;
    padding: 0.5em;
    margin-bottom: 0.5em;
}

.navbar-inner {
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    border-radius: 0px;
    border: 0px;
    background-image: none;
    background-color: black;
    color: white;
    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}

label {
    font-size: 1em;
}

.modal, .modal-footer {
    background-color: black;
}

.modal-body {
    background-color: #505050;
}

.color1 { background-color: #65E6A4; }
.color2 { background-color: #65A8E6; }
.color3 { background-color: #68E665; }
.color4 { background-color: #1DB466; }
.color5 { background-color: #A8E665; }
.color6 { background-color: #DD318A; }
.color7 { background-color: #E6E465; }
.color8 { background-color: #E66568; }
.color9 { background-color: #65E6E4; }
.color10 { background-color: #6568E6; }
.color11 { background-color: #31DD84; }
.color12 { background-color: #A465E6; }
.color13 { background-color: #B41D6B; }
.color14 { background-color: #E465E6; }
.color15 { background-color: #E6A465; }
.color16 { background-color: #E665A8; }

/* Component elements are inline by default; the pages and Bootstrap's .visible-phone need them as blocks. */
[ng-view] > *, user-menu, party-menu {
    display: block;
}

.mobile-navbar {
    font-size: 0.75em;
    margin-left: -20px;
    margin-right: -20px;
}

.navbar {
    border: 0px;
}

.navbar .brand, .navbar .nav > li > a {
    color: white;
    text-shadow: 0 1px 0 #777;
}

.navbar .nav > li > a:focus, .navbar .nav > li > a:hover {
    color: white;
    text-decoration: underline;
}

.historyGraphContainer {
    background-color: #E6A465;
    height: 300px;
    border: 2px solid black;
    border-radius: 5px;
    padding: 10px;
    padding-bottom: 0px;
}

#historyGraph {
    height: 280px;
}

p {
    line-height: 1.2em;
}

/* Runs for as long as DrinkerCtrl keeps the undo window open (5s). */
.undo-countdown {
    animation: undo-countdown 5s linear forwards;
}

@keyframes undo-countdown {
    from { width: 0; }
    to { width: 100%; }
}

.toast-list {
    inset: 15px 15px auto auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
    width: 300px;
    max-width: calc(100vw - 30px);
}

.toast-slot {
    display: grid;
    grid-template-rows: 1fr;
}

.toast-item {
    min-height: 0;
    overflow: hidden;
}

.toast-body {
    position: relative;
    margin-bottom: 10px;
    padding: 10px 30px 14px 12px;
    border-radius: 4px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.toast-title {
    font-size: 1.0em;
    line-height: 1.2em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.toast-text {
    font-size: 0.8em;
}

.toast-close {
    position: absolute;
    top: 2px;
    right: 6px;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
}

.toast-timer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background-color: #3c763d;
    opacity: 0.5;
    transform-origin: left;
    animation: toast-countdown 8s linear forwards;
}

.toast-item:hover .toast-timer {
    animation-play-state: paused;
}

@keyframes toast-countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.toast-slot.ng-enter,
.toast-slot.ng-leave {
    transition: grid-template-rows 0.3s ease;
}

.toast-slot.ng-enter .toast-item,
.toast-slot.ng-leave .toast-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-slot.ng-enter,
.toast-slot.ng-leave.ng-leave-active {
    grid-template-rows: 0fr;
}

.toast-slot.ng-enter .toast-item {
    transform: translateX(110%);
}

.toast-slot.ng-enter.ng-enter-active {
    grid-template-rows: 1fr;
}

.toast-slot.ng-enter.ng-enter-active .toast-item {
    transform: translateX(0);
}

.toast-slot.ng-leave.ng-leave-active .toast-item {
    transform: translateX(110%);
}

.toast-slot.toast-withdrawn.ng-leave.ng-leave-active .toast-item {
    transform: scale(0.8);
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .toast-slot.ng-enter,
    .toast-slot.ng-enter.ng-enter-active,
    .toast-slot.ng-leave,
    .toast-slot.ng-leave.ng-leave-active {
        grid-template-rows: 1fr;
        transition: opacity 0.3s ease;
    }

    .toast-slot.ng-enter .toast-item,
    .toast-slot.ng-leave .toast-item,
    .toast-slot.ng-leave.ng-leave-active .toast-item,
    .toast-slot.toast-withdrawn.ng-leave.ng-leave-active .toast-item {
        transform: none;
        opacity: 1;
        transition: none;
    }

    .toast-slot.ng-enter,
    .toast-slot.ng-leave.ng-leave-active {
        opacity: 0;
    }

    .toast-slot.ng-enter.ng-enter-active,
    .toast-slot.ng-leave {
        opacity: 1;
    }
}

.drink-slot {
    display: grid;
    grid-template-rows: 1fr;
}

.drink-item {
    min-height: 0;
    overflow: hidden;
}

.drink-slot.ng-leave {
    transition: grid-template-rows 0.3s ease 0.15s;
}

.drink-slot.ng-leave .drink-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.drink-slot.ng-leave.ng-leave-active {
    grid-template-rows: 0fr;
}

.drink-slot.ng-leave.ng-leave-active .drink-item {
    transform: translateX(-30px);
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .drink-slot.ng-leave,
    .drink-slot.ng-leave .drink-item {
        transition: none;
    }
}

.party-progress {
    height: 6px;
    margin-top: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.party-progress-fill {
    height: 100%;
    background-color: #262626;
}

/* Full-bleed under the navbar; the container's side padding is 20px on phones. */
.party-time {
    background-color: #262626;
    color: white;
    padding: 8px 20px;
    margin-bottom: 15px;
}

.party-time span {
    white-space: nowrap;
}

.day-stepper-value {
    min-width: 56px;
    color: #555555;
    text-align: center;
}

.day-stepper .btn[disabled] {
    background-color: #B8B8B8;
    background-image: none;
    color: #262626;
    text-shadow: none;
    opacity: 1;
}

.btn.duration-save[disabled] {
    background-color: #D0D0D0;
    background-image: none;
    border-color: #D0D0D0;
    color: #404040;
    text-shadow: none;
    opacity: 1;
}

.duration-summary {
    margin-left: 12px;
}

.help-inline.duration-summary {
    color: inherit;
}

.duration-end {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .help-inline.duration-summary {
        display: block;
        margin-left: 0;
        padding-left: 0;
        margin-top: 10px;
    }
}

.party-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    column-gap: 8px;
}

.party-header-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.party-header-range {
    margin-left: auto;
}

@media (max-width: 767px) {
    .party-header-range {
        flex-basis: 100%;
        margin-left: 0;
    }
}

/* A read-only value lines up with its .control-label, which has 5px of top padding. */
.controls-static {
    padding-top: 5px;
}

@media (max-width: 767px) {
    .controls-static {
        padding-top: 0;
    }
}

.join-link .join-link-url {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 44px;
    font-size: 16px;
    cursor: text;
}

.join-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.join-link-actions .btn {
    min-height: 44px;
}

.join-link-note {
    background-color: #3b3b3b;
    border-radius: 4px;
    padding: 10px 12px;
}

.join-link-confirm {
    background-color: white;
    color: #222;
    border-radius: 6px;
    padding: 14px;
}

.join-link-confirm .join-link-actions {
    justify-content: flex-end;
    margin-bottom: 0;
}

.location-invite-label {
    display: block;
    margin: 0 0 6px;
}

.location-invite-small {
    font-size: 17px;
}

.location-invite-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #dff0d8;
    color: #3c763d;
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 16px;
}

.location-invite-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #3c763d;
}

.location-invite-status-off {
    background-color: #3b3b3b;
    color: #e2e2e2;
}

.location-invite-status-off .location-invite-dot {
    background-color: #999;
}

.location-invite-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 10px 0;
    font-size: 18px;
}

.location-invite-facts dt {
    color: #d8d8d8;
    font-weight: normal;
}

.location-invite-facts dd {
    margin: 0;
}

.location-invite-diagram {
    border: 2px solid black;
    border-radius: 5px;
    background-color: #3b3b3b;
    margin-bottom: 10px;
    max-width: 480px;
}

.location-invite-diagram svg {
    display: block;
    width: 100%;
    height: auto;
}

.location-invite-radius {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    height: 34px;
    margin: 0;
    accent-color: #62c462;
}

.location-invite-scale {
    position: relative;
    max-width: 480px;
    height: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ddd;
}

.location-invite-scale span {
    position: absolute;
    top: 0;
}

.location-invite-scale span:first-child {
    left: 0;
}

.location-invite-scale span:last-child {
    right: 0;
}

.location-invite-scale-mark {
    transform: translateX(-50%);
}

.location-invite-error {
    background-color: #f2dede;
    color: #b94a48;
    border: 1px solid #eed3d7;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.location-invite-error p {
    margin: 0 0 6px;
}

.location-invite-error p:last-child {
    margin: 0;
}

.location-invite-spinner {
    display: inline-block;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    vertical-align: -2px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: location-invite-spin 0.8s linear infinite;
}

@keyframes location-invite-spin {
    to {
        transform: rotate(360deg);
    }
}

.join-page {
    padding-top: 20px;
}

.join-page-lead {
    color: #e2e2e2;
}

.join-page-party h1 {
    margin: 0 0 10px;
    line-height: 1.15;
}

.join-page-party p {
    margin: 0 0 6px;
}

.join-page-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.join-page-actions .btn,
.join-page-invalid .btn {
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.join-page-invalid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    padding-top: 20px;
}

.join-page-invalid h1,
.join-page-invalid p {
    margin: 0;
}

.join-page-invalid p {
    color: #e2e2e2;
    max-width: 320px;
}

.nearby-icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.nearby-entry {
    margin-bottom: 10px;
}

.nearby-entry-button,
.nearby-page .btn {
    box-sizing: border-box;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nearby-page {
    padding-top: 10px;
}

.nearby-join-page {
    padding-top: 20px;
}

.nearby-join-page .join-page-invalid .btn {
    min-width: 260px;
}

.nearby-page-muted {
    color: #e2e2e2;
}

.nearby-party,
.nearby-party:hover,
.nearby-party:focus {
    display: block;
    text-decoration: none;
}

.nearby-party-times {
    flex-basis: 100%;
    font-size: 15px;
}

.nearby-party-distance {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 16px;
}

.nearby-page-refresh {
    margin-top: 6px;
}

.nearby-page-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding-top: 20px;
}

.nearby-page-message h1,
.nearby-page-message h2,
.nearby-page-message p {
    margin: 0;
}

.nearby-page-message p {
    color: #e2e2e2;
    max-width: 320px;
}

.nearby-page-message .btn {
    min-width: 260px;
}

.nearby-page-message-icon {
    width: 64px;
    height: 64px;
}
