.hasepost-text-configurator {
    clear: both;
    margin: 28px 0 24px;
    padding: 24px;
    border: 1px solid #d8dcde;
    background: #f7f8f9;
}

.hasepost-text-configurator [hidden] {
    display: none !important;
}

.hasepost-text-configurator header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    letter-spacing: 0;
}

.hasepost-text-configurator header > p:last-child {
    margin: 0 0 22px;
}

.hasepost-text-configurator__fields,
.hasepost-text-configurator__email {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hasepost-text-configurator label,
.hasepost-text-configurator fieldset {
    min-width: 0;
    margin: 0;
}

.hasepost-text-configurator label > span,
.hasepost-text-configurator legend {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
}

.hasepost-text-configurator label > span small {
    font-weight: 500;
}

.hasepost-text-configurator input[type="text"],
.hasepost-text-configurator input[type="url"],
.hasepost-text-configurator input[type="email"],
.hasepost-text-configurator input[type="file"],
.hasepost-text-configurator select,
.hasepost-text-configurator textarea {
    width: 100%;
}

.hasepost-text-configurator fieldset {
    padding: 12px 14px;
    border: 1px solid #c7cdd1;
    background: #fff;
}

.hasepost-text-configurator fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 18px;
}

.hasepost-text-configurator__wide {
    grid-column: 1 / -1;
}

.hasepost-text-configurator__counter {
    display: block;
    margin-top: 4px;
    text-align: right;
}

.hasepost-text-configurator__email-notice {
    display: block;
    margin-top: 6px;
    color: #5f6872;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
}

.hasepost-text-configurator__preview-button {
    margin-top: 20px !important;
    background: #00679e !important;
    color: #fff !important;
}

.hasepost-text-configurator__preview-wrap {
    margin-top: 22px;
}

.hasepost-text-configurator__preview-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.hasepost-text-configurator__preview-controls button {
    padding: 7px 12px;
    border: 1px solid #aeb5ba;
    background: #fff;
    color: #1b1b1b;
}

.hasepost-text-configurator__preview-controls button.is-active {
    border-color: #00679e;
    background: #00679e;
    color: #fff;
}

.hasepost-text-configurator__preview-stage {
    width: 100%;
    overflow: auto;
    padding: 14px;
    background: #e9ecee;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview {
    width: 366px;
    max-width: 100%;
    height: auto;
    min-height: 250px;
}

.hasepost-text-ad-preview {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 900px;
    max-width: none;
    height: 250px;
    margin: 0 auto;
    padding: 15px 20px 17px;
    overflow: hidden;
    border: 1px solid #a7adb1;
    border-top: 5px solid #e30613;
    background: #fff;
    color: #151515;
    font-family: Arial, Helvetica, sans-serif;
}

.hasepost-text-ad-preview__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.hasepost-text-ad-preview__category {
    overflow: hidden;
    color: #00679e;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hasepost-text-ad-preview__category small {
    margin-left: 5px;
    color: #555;
    font-size: 12px;
    font-weight: 400;
}

.hasepost-text-ad-preview__logo {
    display: flex;
    width: 180px;
    height: 34px;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

.hasepost-text-ad-preview__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hasepost-text-ad-preview__label {
    justify-self: end;
    color: #666;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.hasepost-text-ad-preview h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: #151515;
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hasepost-text-ad-preview p {
    min-height: 0;
    margin: 0;
    overflow: hidden;
    column-count: 2;
    column-gap: 34px;
    column-rule: 1px solid #d8dcde;
    color: #2b2b2b;
    font-size: 15px;
    line-height: 1.34;
    hyphens: auto;
}

.hasepost-text-ad-preview p strong {
    color: #00679e;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview {
    display: block;
    padding: 13px 15px 16px;
    border-top-width: 4px;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview__meta {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 6px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview__category {
    white-space: normal;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview__category small {
    display: block;
    margin: 2px 0 0 26px;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview__logo {
    width: 76px;
    height: 31px;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview h3 {
    margin-bottom: 9px;
    font-size: 20px;
    line-height: 1.16;
    white-space: normal;
}

.hasepost-text-configurator__preview-stage.is-mobile .hasepost-text-ad-preview p {
    overflow: visible;
    column-count: 1;
    font-size: 16px;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .hasepost-text-configurator {
        padding: 20px 16px;
    }

    .hasepost-text-configurator__fields,
    .hasepost-text-configurator__email {
        grid-template-columns: 1fr;
    }
}
