/**
 * Dialogs & Modals
 * Dialog overrides, notification dialogs, output modals, overlay loaders,
 * and dialog-specific article/footer/header styles.
 */

.dialog-inner {
    flex-shrink: 0;
    width: 80%;
}

/* dialog#create_ticket_dialog article {
  width: 100%;
  max-width: 400px;
} */

article>footer,
article>header {
    padding: var(--pico-spacing);
}

.output_modal_content {
    max-height: 500px;
    overflow-y: scroll;
}

.output_modal {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 99999;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: var(--pico-modal-overlay-backdrop-filter);
    backdrop-filter: var(--pico-modal-overlay-backdrop-filter);
    background-color: var(--pico-modal-overlay-background-color);
}

#overlayLoader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--pico-modal-overlay-background-color);
    z-index: 99999;
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.output_modal_container h3 {
    padding: 1rem;
    border-bottom: 1px solid var(--pico-form-element-border-color);
}

.output_modal_content p {
    padding: 0 1rem;
}

.output_modal_container {
    background: var(--pico-background-cardform);
    width: 100%;
    max-width: 360px;
    border-radius: var(--pico-border-radius);
}

.output_modal_links {
    border-top: 1px solid var(--pico-form-element-border-color);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    text-decoration: underline;
}

.notification_dialog article {
    width: 320px;
    text-wrap: balance;
}

.notification_dialog article label {
    display: flex;
    flex-direction: column;
}

dialog#create_ticket_dialog article.full_width {
    max-width: 100%;
    min-height: 80vh;
}

dialog#share_contacts article {
    max-width: 360px;
}

dialog#logbook_filter article,
dialog#diwa_filter article {
    max-width: 320px;
}

#create_orders_dialog article {
    max-width: 500px;
}

#create_orders_dialog footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

#create_orders_dialog footer button,
#create_orders_dialog footer a[role="button"] {
    width: auto;
    margin-bottom: 0;
}

.create-order-success {
    color: var(--pico-color-green-600);
}

.create-order-error {
    color: var(--pico-del-color);
}

.create-order-links {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.create-order-links a {
    width: auto;
}

dialog#service_contract_filter article {
    max-width: 420px;
}

#service_contract_filter input[type="submit"] {
    width: auto;
    float: right;
}

@media (min-width: 768px) {
    dialog article {
        max-width: 90%;
    }
}
