.product-cell-content,
.certificate-product-cell {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.product-cell-name,
.certificate-product-name {
    flex: 1 1 auto;
    min-width: 0;
}

.product-info-actions {
    display: grid;
    grid-template-columns: 20px 37px;
    align-items: center;
    justify-content: center;
    column-gap: 4px;
    width: 61px;
    margin: 0 auto;
}

.product-info-actions .fancybox_1 {
    display: block;
    grid-column: 1;
    width: 20px;
    height: 20px;
    line-height: 0;
}

.product-info-actions .certificate-trigger,
.certificate-product-actions .certificate-trigger {
    grid-column: 2;
    width: 37px;
    border-color: #0E5A88;
    border-radius: 2px;
    background: #0E5A88;
    color: #fff;
}

.product-info-actions .certificate-trigger:hover,
.product-info-actions .certificate-trigger:active,
.certificate-product-actions .certificate-trigger:hover,
.certificate-product-actions .certificate-trigger:active {
    border-color: #0A4569;
    background: #0A4569;
    color: #fff;
}

.product-info-actions--header img {
    display: block;
    grid-column: 1;
    width: 20px;
    height: 20px;
}

.certificate-column-label {
    display: block;
    grid-column: 2;
    width: 37px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 2px;
    background: #fff;
    color: #717171;
    font: bold 10px/18px Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.certificate-trigger {
    flex: 0 0 auto;
    width: 37px;
    height: 20px;
    padding: 0;
    border: 1px solid #0E5A88;
    border-radius: 9px;
    background: #fff;
    color: #0E5A88;
    font: bold 10px/18px Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.certificate-trigger:hover {
    border-color: #0E5A88;
    background: #0E5A88;
    color: #fff;
}

.certificate-trigger:active {
    border-color: #0A4569;
    background: #0A4569;
    color: #fff;
}

.certificate-trigger:focus,
.certificate-dialog-close:focus,
.certificate-retry:focus,
.certificate-document-link:focus {
    outline: 2px solid #E53212;
    outline-offset: 2px;
}

.certificate-dialog-overlay {
    position: fixed;
    z-index: 11000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.48);
    box-sizing: border-box;
}

.certificate-dialog-overlay.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.certificate-dialog {
    width: 100%;
    max-width: 520px;
    margin: auto 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #222;
    box-sizing: border-box;
}

.certificate-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 8px 7px 13px;
    border-bottom: 0;
    background: #E53212;
    box-sizing: border-box;
}

.certificate-dialog-title {
    margin: 0;
    color: #fff;
    font: bold 13px/18px Arial, sans-serif;
}

.certificate-dialog-close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: normal 21px/22px Arial, sans-serif;
    cursor: pointer;
}

.certificate-dialog-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.1);
}

.certificate-dialog-body {
    max-height: calc(100vh - 150px);
    padding: 14px;
    overflow-y: auto;
    box-sizing: border-box;
}

.certificate-loading,
.certificate-empty,
.certificate-error {
    padding: 18px 4px;
    color: #555;
    font: normal 14px/20px Arial, sans-serif;
    text-align: center;
}

.certificate-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.certificate-document {
    padding: 12px 0;
    border-top: 1px solid #E1E1E1;
}

.certificate-document:first-child {
    padding-top: 0;
    border-top: 0;
}

.certificate-document:last-child {
    padding-bottom: 0;
}

.certificate-document-type {
    margin-bottom: 5px;
    color: #555;
    font: normal 12px/17px Arial, sans-serif;
}

.certificate-document-link,
.certificate-document-link:visited {
    display: inline-block;
    max-width: 100%;
    color: #0E5A88;
    font: bold 14px/19px Arial, sans-serif;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.certificate-document-link:hover {
    color: #0A4569;
    text-decoration: underline;
}

.certificate-generate-link {
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.certificate-generate-link:disabled {
    color: #777;
    cursor: wait;
    text-decoration: none;
}

.certificate-document-link.is-disabled {
    color: #777;
    cursor: default;
    text-decoration: none;
}

.certificate-document-status {
    margin-top: 4px;
    color: #777;
    font: normal 12px/17px Arial, sans-serif;
}

.certificate-document-status:empty {
    display: none;
}

.certificate-retry {
    margin-top: 10px;
    padding: 4px 10px;
    border: 1px solid #0E5A88;
    border-radius: 2px;
    background: #fff;
    color: #0E5A88;
    font: normal 13px/18px Arial, sans-serif;
    cursor: pointer;
}

.certificate-retry:hover {
    background: #EEF5F9;
}

body.certificate-dialog-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .certificate-dialog-overlay {
        padding: 12px 8px;
    }

    .certificate-dialog-body {
        max-height: calc(100vh - 100px);
    }
}
