.j3d-watermark__editor,
.j3d-watermark__result {
    margin-top: 24px;
}

.j3d-watermark__file-info,
.j3d-watermark__logo-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 0 0 24px;
    padding: 14px 16px;
    background: #fafbfe;
    border: 1px solid #eceef5;
    border-radius: 8px;
}

.j3d-watermark__file-info div,
.j3d-watermark__logo-info div {
    min-width: 150px;
}

.j3d-watermark__file-info dt,
.j3d-watermark__logo-info dt {
    color: #7a8499;
    font-size: 12px;
}

.j3d-watermark__file-info dd,
.j3d-watermark__logo-info dd {
    margin: 3px 0 0;
    color: #2d3748;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.j3d-watermark__section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eceef5;
}

.j3d-watermark__section h2,
.j3d-watermark__preview-wrap h2,
.j3d-watermark__result h2 {
    margin: 0 0 16px;
    color: #3d4a5c;
    font-size: 19px;
}

.j3d-watermark__type-buttons,
.j3d-watermark__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.j3d-watermark__type-buttons .is-active {
    background: #424cb9;
    border-color: #424cb9;
    color: #fff;
}

.j3d-watermark__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px 28px;
}

.j3d-watermark__field {
    min-width: 0;
    margin-bottom: 16px;
}

.j3d-watermark__field > label,
.j3d-watermark__label {
    display: block;
    margin-bottom: 7px;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
}

.j3d-watermark__field > input[type="text"],
.j3d-watermark__field select {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #d5dae8;
    border-radius: 6px;
    color: #2d3748;
    font-size: 15px;
}

.j3d-watermark__field > input:focus,
.j3d-watermark__field select:focus,
.j3d-watermark__positions button:focus,
.j3d-watermark__type-buttons button:focus,
.j3d-watermark__actions button:focus,
.j3d-watermark__actions a:focus {
    border-color: #424cb9;
    outline: 3px solid rgba(66, 76, 185, .25);
    outline-offset: 1px;
}

.j3d-watermark__field input[aria-invalid="true"] {
    border-color: #c53030;
}

.j3d-watermark__field-error {
    min-height: 19px;
    margin: 6px 0 0;
    color: #c53030;
    font-size: 13px;
    line-height: 1.4;
}

.j3d-watermark__controls--text .j3d-watermark__field,
.j3d-watermark__controls > .j3d-watermark__field {
    flex: 1 1 250px;
}

.j3d-watermark__color-row {
    display: flex;
    gap: 8px;
}

.j3d-watermark__color-row input[type="color"] {
    width: 52px;
    min-height: 44px;
    padding: 3px;
    border: 1px solid #d5dae8;
    border-radius: 6px;
}

.j3d-watermark__color-row input[type="text"] {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #d5dae8;
    border-radius: 6px;
    font-size: 15px;
}

.j3d-watermark__range-field {
    flex: 1 1 270px;
}

.j3d-watermark__range-field label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.j3d-watermark__range-field output {
    color: #424cb9;
    white-space: nowrap;
}

.j3d-watermark__range-field input[type="range"] {
    display: block;
    width: 100%;
    min-height: 30px;
    accent-color: #424cb9;
}

.j3d-watermark__logo-dropzone {
    margin: 0 0 12px;
    padding: 28px 20px;
}

.j3d-watermark__substatus,
.j3d-watermark__status {
    min-height: 22px;
    margin: 12px 0;
    color: #5a6278;
}

.j3d-watermark__status.is-error,
.j3d-watermark__substatus.is-error {
    color: #a12622;
}

.j3d-watermark__status.is-success {
    color: #176b3a;
}

.j3d-watermark__position-field {
    margin-top: 8px;
}

.j3d-watermark__positions {
    display: grid;
    grid-template-columns: repeat(3, minmax(44px, 58px));
    gap: 6px;
}

.j3d-watermark__positions button {
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    border: 1px solid #d5dae8;
    border-radius: 6px;
    background: #fff;
    color: #353fa0;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.j3d-watermark__positions button[aria-pressed="true"] {
    border-color: #424cb9;
    background: #eef0fb;
}

.j3d-watermark__positions button:disabled,
.j3d-watermark__range-field input:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.j3d-watermark__checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 6px 0 16px;
    color: #4a5568;
    font-weight: 600;
}

.j3d-watermark__checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #424cb9;
}

.j3d-watermark__preview-wrap {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eceef5;
}

.j3d-watermark__preview-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background: #f1f3f8;
    border: 1px solid #dfe3ed;
    border-radius: 6px;
}

.j3d-watermark__result img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
}

.j3d-watermark__result p {
    color: #5a6278;
}

@media (max-width: 640px) {
    .j3d-watermark__editor,
    .j3d-watermark__result {
        padding: 16px;
    }

    .j3d-watermark__actions,
    .j3d-watermark__actions .btn-u,
    .j3d-watermark__actions a {
        width: 100%;
    }

    .j3d-watermark__type-buttons .btn-u {
        flex: 1 1 120px;
    }
}
