/*
 * css/index.css
 *
 * App-wide style declarations
 */

/* -------------------------------------------------------------------------- */
/* Page layout */

html,
body
{
    background: #212121;
    color: #aaa;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

main
{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2.5rem;
    min-height: 100vh;
    min-width: 100%;
    animation: main-fade-in 0.15s;
}

@keyframes main-fade-in
{
    from
    {
        transform: translate( -25px, 0 );
        opacity: 0;
    }
    to
    {
        transform: translate( 0, 0 );
        opacity: 1;
    }
}

main .columns
{
    width: 100%;
    /* max-width: 1000px; */
}

main .title
{
    font-weight: 700;
    margin-bottom: 2rem;
}

/* -------------------------------------------------------------------------- */
/* Bulma overrides */

.title
{
    color: #aaa !important;
}

.panel-tabs
{
    border-bottom-color: #aaa !important;
}

.tabs a,
.panel-tabs a
{
    color: #aaa;
    border-bottom-color: #aaa;
}

.tabs a:hover,
.tabs a:active,
.panel-tabs a:hover:not(.is-active),
.panel-tabs a:active:not(.is-active)
{
    color: #eee;
    border-bottom-color: #eee;
}

.tabs li.is-active a,
.panel-tabs a.is-active
{
    color: #c55 !important;
    border-bottom-color: #c55 !important;
}

.card-header-title,
.panel-heading
{
    color: #aaa !important;
}

/* -------------------------------------------------------------------------- */
/* Generic component setup */

a
{
    color: #c55;
}

input.input
{
    background: #fff;
}

.box
{
    margin: 0 0 0 0.75rem;
}

.box,
.card,
.modal-card,
.panel
{
    background: none;
    box-shadow: none;
    border: 1px solid #383737;
    border-radius: 0.75rem;
}

.button
{
    font-weight: 700;
}

progress
{
    max-width: 200px;
}

.control.is-loading::after
{
    top: .75em;
}

article.message
{
    background: #383737;
}

article.message .message-header,
article.message .message-body
{
    color: #aaa;
}

/* -------------------------------------------------------------------------- */
/* Modal components */

.modal-card
{
    width: 500px;
    max-width: 90%;
    animation: modal-slide-up 0.15s;
}

@keyframes modal-slide-up
{
    from
    {
        transform: translate( 0, 25px );
        opacity: 0;
    }
    to
    {
        transform: translate( 0, 0 );
        opacity: 1;
    }
}

.modal-card header
{
    background: #fff;
    border: none;
    padding: 0.75rem 1rem;
}

.modal-card .modal-card-title
{
    font-size: 16px;
    line-height: inherit;
    font-weight: 700;
}

.modal-card .delete
{
    background: #485FC7;
}

.modal-card .delete:hover,
.modal-card .delete:focus
{
    background: #363636;
}

.modal-card .delete:disabled
{
    opacity: 0.5;
}

.modal-card-body,
.card-content
{
    padding: 0.75rem 1.5rem 1.5rem 1.5rem;
}

.modal-background
{
    background: rgba( 0, 0, 0, 0.1 );
}

.modal-card-body button
{
    width: 8rem;
}

/* -------------------------------------------------------------------------- */
/* Logo */

.logo
{
    max-height: 200px;
    max-width: 80%;
    margin-bottom: 2rem;
}
.logo-small
{
    max-height: 100px;
    max-width: 80%;
    margin-bottom: 2rem;
}

/* -------------------------------------------------------------------------- */
/* Misc. to be organized */

.Subview
{
    animation: main-fade-in 0.15s;
    justify-content: center;
}

.AppNavTabs
{
    width: 25rem;
    max-width: 90%;
    margin-bottom: 2rem;
}
.AppNavTab
{
    width: 50%;
}
.AppNavTab.is-active a
{
    cursor: default;
}

/* -------------------------------------------------------------------------- */
/* Auth view */

.Auth .shake
{
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100%
    {
        transform: translateX( 0 );
    }
    14%
    {
        transform: translateX( -1rem );
    }
    29%
    {
        transform: translateX( 1rem );
    }
    43%
    {
        transform: translateX( -0.75rem );
    }
    57%
    {
        transform: translateX( 0.75rem );
    }
    71%
    {
        transform: translateX( -0.5rem );
    }
    86%
    {
        transform: translateX( 0.5rem );
    }
}

/* -------------------------------------------------------------------------- */
/* LinkList component */

.LinkList
{
    min-height: 20rem;
    max-height: 20rem;
    overflow-y: scroll;
}

.LinkList .panel-block
{
    display: block;
}

.LinkList .link-name,
.LinkList .link-dest
{
    font-family: monospace;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.LinkList .link-name
{
    font-weight: 600;
}

.LinkList .link-dest
{
    font-weight: 300;
}

.LinkList .link-name .query-match,
.LinkList .link-dest .query-match
{
    color: #23D160;
    font-weight: 700;
}

.LinkList .nothing-here
{
    display: block;
    width: max-content;
    margin: 9.25rem auto;
}

/* ---------------------------------- */
/* LinkOptionsModal component */

.LinkOptionsModal .visit-counter
{
    font-weight: 700;
}

/* ---------------------------------- */
/* EndSessionButton component */

.EndSessionButton
{
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;

    /* Bulma overrides: */
    color: #c55 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.EndSessionButton:hover,
.EndSessionButton:focus
{
    /* Bulma overrides: */
    color: #eee !important;
}

/* -------------------------------------------------------------------------- */
/* UserInfoCard component */

.UserInfoCard .card-header
{
    box-shadow: none;
}

.UserInfoCard button
{
    /* width: 8rem; */
}

.UserInfoCard .field
{
    width: 100%;
}

.UserInfoCard .AvatarPreview
{
    max-height: 400px;
    width: 100%;
    object-fit: contain;
    background: #383737;
    border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/* ShortenedLinksPanel component */

.ShortenedLinksPanel .panel-heading
{
    font-size: inherit;
    line-height: inherit;
    background: none;
}

.ShortenedLinksPanel .panel-tabs a
{
    font-weight: 700;
}

.ShortenedLinksPanel .panel-search
{
    padding: .75rem 1.5rem;
}
