/*noinspection ALL*/
:root {
    --primary-dark: #6c757d;
    --secondary-dark: #495057;
    --primary-blue: #007bff;
    --primary-yellow: #ee9b00;
    --primary-color: #ff83f8;
    --secondary-color: #d776f7;
    --bg-color: #e9ecef;
    --text-color: #495057;
    --box-bg: #f8f9fa;
    --card-bg: #f8f9fa;
    --title-color: #495057;
    --subtitle-color: #4a4a4a;
    --input-bg: #f8f9fa;
    --input-border: #dbdbdb;
    --input-text: #363636;
    --navbar-bg: #495057;
    --navbar-item-hover: #555555;
    --table-bg: #f8f9fa;
    --table-text: #363636;
    --table-head-text: #363636;
    --nav-height: 4.25rem;
}

/* Neutralize Bulma semantic colors */

.button.is-info,
.button.is-success,
.button.is-danger,
.button.is-primary {
    background-color: var(--secondary-dark);
    border: none;
}

/*noinspection CssConvertColorToRgbInspection*/
.tag:not(body).is-primary {
    background-color: #ffe08a;
    color: rgba(0, 0, 0, .7);
}

/*noinspection CssConvertColorToRgbInspection*/
.tag:not(body).is-success {
    background-color: #a1cca5;
    color: rgba(0, 0, 0, .7);
}

.button.is-info:hover,
.button.is-success:hover,
.button.is-danger:hover,
.button.is-primary:hover {
    opacity: 90%;
    background-color: var(--secondary-dark);
}

html {
    background-color: var(--bg-color);
}

html { height: 100%; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s,
    color 0.3s;
    /*min-height: 100vh;
    height: 100vh;*/
    vertical-align: middle;
    height: 100%;
}

.hero.is-light { background-color: var(--bg-color); }

.box, .card { background-color: var(--box-bg); color: var(--text-color); box-shadow: 0 0.5em 1em -0.125em rgba(0, 0, 0, 0.2); transition: background-color 0.3s; }

.title { color: var(--title-color) !important; }

.subtitle { color: var(--subtitle-color) !important; }

.label { color: var(--text-color) !important; }

.input, .textarea, .select select { background-color: var(--input-bg); color: var(--input-text); border-color: var(--input-border); }

.input::placeholder { color: var(--subtitle-color); opacity: 0.7; }

/*.input { font-size: 0.8rem; }*/
.navbar.is-info { background-color: var(--navbar-bg) !important; transition: background-color 0.3s; }

/*.button.is-primary { background-color: var(--navbar-bg); border: none; }
.button.is-primary:hover, { background-color: var(--navbar-bg); opacity: 85%; }*/
/*.button.is-light { font-size: 0.875rem; padding-left: 0.75rem; padding-right: 0.75rem; }*/
.button.is-dark {
    background-color: var(--primary-dark);
}

.button.is-dark:hover {
    background-color: var(--primary-dark);
    opacity: 90%;
}

.button.is-primary {
    background-color: var(--primary-dark);
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-danger, .button.is-danger:hover {
    background-color: #ff686b;
}

.button.is-danger:hover {
    opacity: 90%;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-danger[disabled], fieldset[disabled] .button.is-danger,
.button.is-danger[disabled]:hover, fieldset[disabled] .button.is-danger:hover {
    background-color: #ff686b;
    opacity: 0.5;
}

.button.is-danger[disabled]:hover, fieldset[disabled] .button.is-danger:hover {
    opacity: 0.5;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-success, .button.is-success:hover {
    background-color: #6c757d;
}

.button.is-success:hover {
    opacity: 90%;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-warning, .button.is-warning.is-hovered, .button.is-warning:hover {
    background-color: #efcd5d;
}

.button.is-warning.is-hovered, .button.is-warning:hover {
    opacity: 90%;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-info, .button.is-info:hover {
    background-color: #5289ad;
}

.button.is-info:hover {
    opacity: 90%;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-info[disabled], fieldset[disabled] .button.is-info,
.button.is-info[disabled]:hover, fieldset[disabled] .button.is-info:hover {
    background-color: #5289ad;
    opacity: 0.5;
}

.button.is-info[disabled]:hover, fieldset[disabled] .button.is-info:hover {
    opacity: 0.5;
}

.button.is-light, .button.is-light.is-hovered, .button.is-light:hover {
    background-color: transparent;
}

/*noinspection CssConvertColorToRgbInspection*/
.button.is-light.is-outlined.is-focused, .button.is-light.is-outlined.is-hovered,
.button.is-light.is-outlined:focus, .button.is-light.is-outlined:hover {
    background-color: transparent;
    border-color: transparent;
    color: #f5f5f5;
}

.button.is-light.is-outlined.is-focused, .button.is-light.is-outlined.is-hovered,
.button.is-light.is-outlined:focus, .button.is-light.is-outlined:hover {
    border-color: transparent;
    background-color: transparent;
}

.button.is-light.is-outlined {
    border-color: transparent;
}

.button.is-white, .button.is-white.is-active,
.button.is-white:active, .button.is-white[disabled], fieldset[disabled] .button.is-white {
    background-color: var(--card-bg);
    box-shadow: none;
    border-color: transparent;
}

.button.is-white:hover {
    color: var(--text-color);
}

.pagination {
    padding-top: 1rem;
}

.pagination.is-centered .pagination-previous {
    order: 1;
    color: var(--subtitle-color);
}

.pagination.is-centered .pagination-next {
    order: 3;
    color: var(--subtitle-color);
}

.pagination.is-centered .pagination-list {
    order: 2;
    font-size: smaller;
    color: var(--primary-dark);
    padding: 0 2rem;
}

/* Table Overrides for Dark Mode */
.table { background-color: var(--table-bg); color: var(--table-text); }

.table thead td, .table thead th { color: var(--table-head-text); }

.table.is-striped tbody tr:not(.is-selected):nth-child(even) { background-color: var(--table-bg) !important; }

.table.is-hoverable tbody tr:not(.is-selected):hover { background-color: rgba(255, 255, 255, 0.1) !important; }

.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover { background-color: var(--table-bg); }

.table td, .table th { border-color: var(--input-border); color: var(--table-text); }

.table td, .table th {
    padding: 1em 0.75em;
    vertical-align: middle;
}

tr td a {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#td_original_url {
    max-width: 180px;
}

#td_minilink {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#td_minilink a {
    /*color: #343A40;*/
}

#td_actions {
    width: 240px;
    min-width: 240px;
}

.navbar {
    position: relative;
    z-index: 100;
}

.navbar-menu {
    background-color: var(--navbar-bg);
}

#navbarBasic {
    box-shadow: none;
}

.navbar > .container, .navbar-brand, .navbar-tabs, .navbar-burger, .navbar {
    min-height: 4.25rem;
    padding: 0 0.25rem;
}

.navbar-burger:hover {
    background: 0 0;
}

/*noinspection CssConvertColorToRgbInspection*/
.navbar.is-info .navbar-end .navbar-link, .navbar.is-info .navbar-end > .navbar-item,
.navbar.is-info .navbar-start .navbar-link, .navbar.is-info .navbar-start > .navbar-item,
.navbar-item, .navbar-link {
    color: #f5f5f5;
}

.fa-power-off:before {
    font-size: 1.1rem;
}

.fa-arrows-rotate:before, .fa-refresh:before, .fa-sync:before {
    padding-right: 0.5em;
}

/*noinspection CssBrowserCompatibilityForProperties,CssConvertColorToRgbInspection*/
.svg-icon {
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.175em;
    fill: #ffffff;
    fill-color: #ffffff;
}

#create_minilink + div { padding-top: 1.5rem; }

#create_minilink + div > form + div { padding-top: 1.0rem; }

#login_view > .hero-body {
    padding: 3rem;
}

a { color: var(--text-color); }

a:hover { opacity: 90%; }

a.navbar-item:hover { background-color: var(--navbar-bg) !important; }

.hero-body { padding-top: 0; padding-bottom: 0; }

.hero.is-fullheight {
    min-height: unset;
    /*padding-top: 2.5rem;*/
    height: 100%;
}

#register_view.is-fullheight, #change_password_view.is-fullheight {
    height: calc(100vh - var(--nav-height)) !important;
}

.section {
    padding: 0;
    margin: 3rem 3rem 3rem 3rem;
    min-width: 400px;
}

/* Root container for flashes */

#change_password_view .flash-root, #login_view .flash-root {
    /*min-height: 0;
    height: 0;*/
}

.flash-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none; /* click-through */
}

/* =========================
   Flash message
   ========================= */

/*noinspection CssUnresolvedCustomProperty,CssUnknownProperty,CssBrowserCompatibilityForProperties*/
.flash-message {
    aria-live: polite;
    pointer-events: auto;
    /*max-width: 640px;*/
    /*min-height: 76px !important;*/
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
    text-align: center;
    margin: 0 auto;
    /*border-radius: 0 0 6px 6px;*/
    border-radius: 0;

    /* Start hidden above viewport */
    transform: translateY(-120%);
    opacity: 0;

    /* Animation */
    animation: flash-slide-in 300ms ease-out forwards,
    flash-slide-out 300ms ease-in forwards;
    animation-delay: 0ms,
    var(--flash-timeout, 2000ms);
}

/* =========================
   Animations
   ========================= */

@keyframes flash-slide-in {
    from {
        transform: translateY(-120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes flash-slide-out {
    to {
        transform: translateY(-120%);
        opacity: 0;
    }
}

/*noinspection CssConvertColorToRgbInspection*/
.flash-message.is-success { background-color: #48c774; color: #ffffff; }

/*noinspection CssConvertColorToRgbInspection*/
.flash-message.is-error { background-color: #f14668; color: #ffffff; }

/*noinspection CssConvertColorToRgbInspection*/
.flash-message.is-warning { background-color: #ffdd57; color: #363636; }

/*noinspection CssConvertColorToRgbInspection*/
.flash-message.is-info { background-color: #209cee; color: #ffffff; }

.table {
    /*background-color: var(--surface);*/
    color: var(--text-color);
}

.table thead th {
    /*    color: var(--text-muted);*/
    font-weight: 600;
}

.table.is-striped tbody tr:nth-child(even) {
    /*background-color: var(--surface-muted);*/
}

.table.is-hoverable tbody tr:hover {
    background-color: var(--text-color);
}

.input, .textare, .select select {
    box-shadow: none;
}

/*noinspection CssConvertColorToRgbInspection*/
.input:focus, .input:active {
    border-color: #b5b5b5;
    box-shadow: none;
}

.box {
    padding: 1.25rem 1.75rem;
}

.column {
    padding: 0;
}

#login_view > .hero-body {
    padding: 0.75rem;
}

#statistics.columns .column {
    /* padding: 0.75rem;*/
    padding: 0.5rem 0;
}

#statistics.columns .column .title {
    font-size: 1.15rem;
}

#statistics .notification {
    padding: 1.25rem;
}

#stats_view .column {
    padding: 0.5rem 0;
}

#stats_view .columns {
    margin: 0.75rem 0 0 0;
}

#stats_view .box, #stats_view .box.mt-6 {
    padding: 1.25rem !important;
    margin: 0 !important;
    width: 100%;
    height: 100%;
}

#stats_view .subtitle {
    font-size: 1rem;
    margin-top: -1rem;
}

#stats_view .subtitle a {
    color: var(--primary-blue);
}

#stats_view .mb-4 {
    margin-bottom: 0 !important;
}

#stats_view {
    padding-bottom: 3rem;
}

#stats_view .container {
    margin: 0;
    padding: 0 1.25rem;
}

@media screen and (max-width: 375px) {
    .navbar > .container, .navbar-brand, .navbar-tabs, .navbar-burger, .navbar {
        padding: 0;
    }
}

@media screen and (max-width: 413px) {
    .table.is-responsive-cards tbody td::before {
        content: none !important;
    }

    tr td a {
        max-width: 65vw !important;
    }
}

@media screen and (max-width: 567px) {
    .mb-6 {
        margin-bottom: 1rem !important;
    }

    .section {
        min-width: 320px;
        padding: 0;
        margin: 0;
    }

    .columns {
        margin: 0;
    }

    #create_minilink .field.has-addons {
        display: block !important;
    }

    #create_minilink .control:last-child {
        text-align: right;
    }

    #create_minilink .control:last-child button.is-info {
        width: 100%;
    }

    #create_minilink .control {
        /*margin: 1.5rem 0;*/
        margin: 1.5rem 0 0.25rem 0;
    }

    h1.title {
        /*padding: 1rem 1rem 0 1rem;*/
        padding: 1rem 0 0 0;
    }

    #stats_view .subtitle {
        padding: 0;
    }

    .column {
        padding: 0;
    }

    #login_view > .hero-body {
        padding: 0.75rem !important;
    }
}

@media screen and (min-width: 568px) {
    .column {
        padding: 0;
    }

    #login_view > .hero-body {
        padding: 0 6.5rem !important;
    }
}

@media screen and (max-width: 735px) {
    .table.is-responsive-cards thead { display: none; }

    .table.is-responsive-cards tbody tr { display: block; margin-bottom: 1.5rem; border: 1px solid var(--input-border); border-radius: 4px; padding: 1rem; background: var(--box-bg); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); }

    .table.is-responsive-cards tbody td { display: flex; justify-content: space-between; border: none; padding: 0.5rem 0; text-align: right; background: transparent; color: var(--text-color); }

    .table.is-responsive-cards tbody td:before { content: attr(data-label); font-weight: bold; margin-right: 1rem; text-align: left; }

    .table.is-responsive-cards tbody td:last-child { border-bottom: none; }

    tr td a {
        max-width: 44vw;
    }

    #td_original_url, #td_minilink {
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
    }

    #td_actions, #td_minilink {
        width: 100%;
    }

    .column.is-8, .column.is-8-tablet {
        width: 100%;
    }

    .column.is-offset-2, .column.is-offset-2-tablet {
        margin-left: 0;
    }

}

@media screen and (min-width: 736px) {
    #statistics.columns .column, #stats_view .column {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    #stats_view .columns:not(.is-desktop) {
        display: flex !important;
    }

    #stats_view .column.is-6 {
        width: 50%;
    }

    #stats_view .column.is-4 {
        width: 33.33333%;
    }

}

@media screen and (max-width: 768px) {
    .column {
        padding: 0;
    }

    #login_view > .hero-body {
        padding: 0 4.5rem;
    }

    #td_minilink {
        width: 180px;
        max-width: 180px;
        min-width: 180px;
    }

    /*#stats_view .column.is-6, #stats_view .column.is-6-tablet,
    #stats_view .column.is-4, #stats_view .column.is-4-tablet {
        padding: 0.75rem;
    }*/
}

@media screen and (min-width: 769px) {
    #statistics.columns .column, #stats_view .column {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    #stats_view > .container {
        padding: 0;
    }

    /*#stats_view .column.is-8, #stats_view .column.is-8-tablet {
        width: 66.66667%;
        padding: 0.75rem;
    }

    #stats_view .column.is-4, #stats_view .column.is-4-tablet {
        width: 33.33333%;
        padding: 0.75rem;
    }

    #stats_view .column.is-6, #stats_view .column.is-6-tablet {
        padding: 0.75rem;
    }*/
    .column.is-8, .column.is-8-tablet {
        width: 80%;
    }

    .column.is-offset-2, .column.is-offset-2-tablet {
        margin-left: 10%;
    }

    .column.is-5, .column.is-5-tablet, .column.is-5-desktop {
        width: 65%;
    }
}

@media screen and (min-width: 769px) and (max-width: 940px) {
    .column.is-8, .column.is-8-tablet {
        width: 100%;
    }

    .column.is-offset-2, .column.is-offset-2-tablet {
        margin-left: 0;
    }

    .column.is-5, .column.is-5-tablet {
        /*width: 50%;*/
    }

    #td_minilink {
        width: 180px;
        max-width: 180px;
        min-width: 180px;
    }
}

@media screen and (min-width: 941px) and (max-width: 1023px) {
    .column.is-5, .column.is-5-tablet, .column.is-5-desktop {
        width: 50%;
    }

    #td_minilink {
        width: 180px;
        max-width: 180px;
        min-width: 180px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1216px) {
    .column.is-5, .column.is-5-tablet, .column.is-5-desktop {
        width: 50%;
    }
}

@media screen and (min-width: 1217px) {
    .column.is-5, .column.is-5-tablet, .column.is-5-desktop {
        width: 45%;
    }
}
