/**
    Zakladne stylovanie API klienta
 */

/**
    Farebna paleta API klienta.

    amedi.css sa nacitava vzdy (js_client/include.html.twig), preto su premenne
    definovane tu a pouzivaju ich aj congress.css, user.css a adttest.css.

    Zakladne znackove farby drzime ako RGB kanaly, aby -light variant bola ta ista
    farba s alfou a dala sa vypytat aj ad-hoc:
        background-color: rgb(var(--amedi-blue-rgb) / 6%);
 */
:root {
    /* Znacka - kanaly */
    --amedi-blue-rgb: 0 85 165;
    --amedi-blue-alt-rgb: 0 99 175;
    --amedi-green-rgb: 0 135 135;
    --amedi-green-alt-rgb: 42 161 169;

    /* Znacka */
    --amedi-blue: rgb(var(--amedi-blue-rgb));
    --amedi-blue-light: rgb(var(--amedi-blue-rgb) / 22%);
    --amedi-blue-alt: rgb(var(--amedi-blue-alt-rgb));
    --amedi-blue-alt-light: rgb(var(--amedi-blue-alt-rgb) / 12%);
    --amedi-green: rgb(var(--amedi-green-rgb));
    --amedi-green-light: rgb(var(--amedi-green-rgb) / 22%);
    --amedi-green-alt: rgb(var(--amedi-green-alt-rgb));
    --amedi-green-alt-light: rgb(var(--amedi-green-alt-rgb) / 12%);

    /* Menu - hover a aktivna polozka su alfa stupne zakladnej modrej */
    --amedi-menu-hover: rgb(var(--amedi-blue-rgb) / 12%);
    --amedi-menu-active: rgb(var(--amedi-blue-rgb) / 22%);

    /* Stavove farby */
    --amedi-success-rgb: 42 136 92;
    --amedi-success: rgb(var(--amedi-success-rgb));
    --amedi-success-light: rgb(var(--amedi-success-rgb) / 22%);
    --amedi-danger: #dc3545;
    --amedi-danger-hover: #bb2d3b;
    --amedi-danger-light: #fcebec;
    --amedi-error: #da0303;
    --amedi-warning: #f0c419;

    /* Text */
    --amedi-text: #505050;
    --amedi-text-strong: #313131;

    /* Siva skala */
    --amedi-grey-rgb: 136 136 136;
    --amedi-grey: rgb(var(--amedi-grey-rgb));
    --amedi-grey-light: #bbbbbb;
    --amedi-grey-dark: #666666;

    /* Plochy a ramiky */
    --amedi-border-light: #eeeeee;
    --amedi-border: #dddddd;
    --amedi-border-strong: #b9b9b9;
    --amedi-surface: #f9f9f9;
    --amedi-surface-muted: rgb(var(--amedi-grey-rgb) / 12%);
    --amedi-overlay: rgb(0 0 0 / 60%);
}

.amedi-element {
    width: 100%;
    min-height: 240px;
    display: table;
    position: relative;
}

#amedi-content {
    padding: 10px;
}

#amedi-loading {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--amedi-border);
    opacity: 0.8;
    display: none;
    font-size: 1.5em;
}

#amedi-message {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--amedi-border);
    display: none;
}

#amedi-inner-message, #amedi-inner-loading {
    position: absolute;
    transform: translate(0, -50%);
    text-align: center;
    width: 100%;
    top: 50%;
}

ul.amedi-pagination {
    text-align: center;
    list-style-type: none;
    margin: 5px auto !important;
    padding: 0 !important;
}

.amedi-pagination .amedi-current-page {
    background-color: var(--amedi-grey);
}

.amedi-pagination .amedi-page.disabled {
    cursor: not-allowed !important;
    pointer-events: none;
}

.amedi-pagination li {
    margin: 0;
    display: inline-block;
}

.amedi-message {
    border: 1px solid var(--amedi-border);
    padding: 20px;
    margin: 20px 0;
}

.amedi-success-message {
    background-color: var(--amedi-success-light);
}

.amedi-button {
    display: block;
    padding: 10px 20px;
    color: var(--amedi-text-strong);
    border: 1px solid var(--amedi-border-strong);
    text-decoration: none;
    background-color: var(--amedi-border);
}

.amedi-button:hover {
    background-color: var(--amedi-grey-light);
    text-decoration: none;
}

/**
    Ikonove tlacidlo bez vyplne - ciste biele, bez ramika, sedy obsah.

    Drzi si triedu `btn` z temy kvoli rozmerom a zarovnaniu, preto je selektor
    dvojtriedny (.btn.amedi-btn-plain) - prebije temu bez !important.
 */
.btn.amedi-btn-plain {
    background-color: white;
    border: none;
    box-shadow: none;
    color: var(--amedi-grey);
}

.btn.amedi-btn-plain:hover {
    background-color: white;
    color: var(--amedi-text);
    text-decoration: none;
}

.amedi-back-button {
    display: inline-block;
    margin-top: 20px;
}

.amedi-mt-10 {
    margin-top: 10px;
}

.amedi-mb-10 {
    margin-bottom: 20px;
}

.amedi-mt-20 {
    margin-top: 20px;
}

.amedi-mb-20 {
    margin-bottom: 10px;
}

.amedi-text-center {
    text-align: center;
}

.w-50 {
    width: 50%;
}

.ml-auto {
    margin-left: auto !important;
}

.mr-auto {
    margin-right: auto !important;
}

.align-items-center {
    -ms-flex-align: center!important;
    align-items: center!important;
}

.justify-content-between {
    -ms-flex-pack: justify!important;
    justify-content: space-between!important;
}

.flex-fill {
    -ms-flex: 1 1 auto!important;
    flex: 1 1 auto!important;
}

.d-flex {
    display: -ms-flexbox;
    display: flex;
}

.mr-4, .mx-4 {
    margin-right: 1.5rem!important;
}

.ml-4, .mx-4 {
    margin-left: 1.5rem!important;
}

.mr-2, .mx-2 {
    margin-right: 0.5rem!important;
}

.ml-2, .mx-2 {
    margin-left: 0.5rem!important;
}

.mb-3, .my-3 {
    margin-bottom: 1rem!important;
}

.p-2 {
    padding: 0.5rem!important;
}

.w-100 {
    width: 100%!important;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6!important;
}

.input-group {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: stretch;
    align-items: stretch;
    width: 100%;
}

.input-group-append {
    margin-left: -1px;
}

.input-group-append, .input-group-prepend {
    display: -ms-flexbox;
    display: flex;
}

.input-group-text {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.input-group>.input-group-append>.btn, .input-group>.input-group-append>.input-group-text, .input-group>.input-group-prepend:first-child>.btn:not(:first-child), .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child), .input-group>.input-group-prepend:not(:first-child)>.btn, .input-group>.input-group-prepend:not(:first-child)>.input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label, .input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after, .input-group:not(.has-validation)>.custom-select:not(:last-child), .input-group:not(.has-validation)>.form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group>.custom-file, .input-group>.custom-select, .input-group>.form-control, .input-group>.form-control-plaintext {
    position: relative;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}

.invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: .875em !important;
    color: var(--amedi-danger) !important;
}

.amedi-js-menu {
    text-align: center;
    margin-bottom: 30px;
}

.amedi-js-menu-item {
    display: inline-block;
    padding: 3px 0px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    color: var(--amedi-text) !important;
    border-bottom: 1px solid transparent;
}

.amedi-js-menu-item.active {
    border-bottom: 1px solid var(--amedi-blue);
}

.amedi-js-menu-item:hover {
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid var(--amedi-blue);
}

.amedi-js-menu-divider {
    border-right: 1px solid var(--amedi-blue);
    padding: 5px 0px;
    margin: 0px 15px;
    width: 1px;
    content: "";
    background-color: var(--amedi-blue);
    display: inline-block;
}

.amedi-js-menu-divider:last-of-type {
    display: none;
}

.form-group {
    margin-bottom: 1rem;
}

/**
    Nativne checkboxy a radia prefarbene na znackovu modru.

    accent-color je jediny sposob ako zafarbit nativny ovladac bez toho, aby sme
    ho nahradzali vlastnou grafikou - zostava nam focus ring, disabled aj klavesnica.
    Scope #amedi-content drzi farbu vnutri JS klienta a nepretecie do WP temy.
 */
#amedi-content input[type="checkbox"],
#amedi-content input[type="radio"] {
    accent-color: var(--amedi-blue);
}

.btn-block {
    display: block;
    width: 100%;
}

.amedi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--amedi-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.amedi-modal {
    background: #fff;
    border-radius: 2px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: amediFadeIn 0.3s ease-out;
}

@keyframes amediFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.amedi-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--amedi-border-light);
    background: var(--amedi-surface);
}

.amedi-modal-header h3 { margin: 0; font-size: 15px; }

.amedi-modal-body { padding: 20px; line-height: 1.5; }

.amedi-modal-body h3 {
    font-size: 30px;
}

.amedi-modal-body h5 {
    font-size: 22px;
    font-weight: normal;
}

.amedi-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--amedi-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.amedi-modal-btn {
    padding: 10px 20px;
    border: 1px solid var(--amedi-border-strong);
    color: inherit;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.amedi-modal-btn-confirm { background: var(--amedi-blue); color: white; border-color: var(--amedi-blue); }
.amedi-modal-btn-confirm:hover { background: var(--amedi-blue-alt); }

.amedi-element .btn-danger { background: var(--amedi-danger); color: white; border-color: var(--amedi-danger); }
.amedi-element .btn-danger:hover { background: var(--amedi-danger-hover); }

@media (max-width: 425px) {
    .amedi-modal-footer {
        display: block;
    }

    .amedi-modal-body {
        word-break: break-word;
    }

    .amedi-modal-body h5 {
        font-size: 17px;
    }

    .amedi-modal-body h3 {
        font-size: 18px;
    }

    .amedi-modal-btn {
        width: 100%;
        margin: 5px 0;
    }
}