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

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

html,
body
{
    font-family: Open Sans, 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;
}

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

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

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

.button
{
    font-weight: 700;
}

progress
{
    max-width: 200px;
}

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

/* -------------------------------------------------------------------------- */
/* 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;
}

/* -------------------------------------------------------------------------- */
/* 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;
}

/* ---------------------------------- */
/* LogOutButton component */

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

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

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

/* -------------------------------------------------------------------------- */
/* ShortenLinkCard component */

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

.ShortenLinkCard button
{
    width: 8rem;
}

/* -------------------------------------------------------------------------- */
/* 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;
}
