.fi-panel-admin .fi-main {
    width: 100%;
    max-width: 1280px !important;
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
}

.fi-panel-admin .fi-sc-form,
.fi-panel-admin .fi-page-content > .fi-sc,
.fi-panel-admin .fi-sc-form > .fi-grid-col,
.fi-panel-admin .fi-sc-form > .fi-grid-col > .fi-sc-component {
    width: 100%;
    max-width: none !important;
}

.fi-panel-admin .fi-fo-rich-editor-main,
.fi-panel-admin .fi-fo-rich-editor-content {
    min-height: 360px;
}

.fi-panel-admin .fi-fo-rich-editor-content {
    align-content: start;
}

@media (max-width: 768px) {
    .fi-panel-admin .fi-fo-rich-editor-main,
    .fi-panel-admin .fi-fo-rich-editor-content {
        min-height: 260px;
    }
}

.popup-area-editor {
    display: grid;
    gap: 16px;
}

.popup-position-picker {
    display: grid;
    gap: 10px;
}

.popup-position-picker__screen {
    display: grid;
    max-width: 560px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.03);
    padding: 12px;
}

.popup-position-picker__screen button {
    min-height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    color: rgb(209, 213, 219);
    font-weight: 800;
    cursor: pointer;
}

.popup-position-picker__screen button.is-active {
    border-color: rgb(245, 158, 11);
    background: rgba(245, 158, 11, 0.22);
    color: rgb(251, 191, 36);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.popup-position-picker__help {
    margin: 0;
    color: rgb(156, 163, 175);
    font-size: 13px;
}

.submission-zip-download {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 14px;
}

.submission-zip-download strong,
.submission-zip-download span {
    display: block;
}

.submission-zip-download strong {
    color: rgb(243, 244, 246);
    font-weight: 800;
}

.submission-zip-download span {
    margin-top: 3px;
    color: rgb(156, 163, 175);
    font-size: 13px;
}

.submission-zip-download a {
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgb(234, 88, 12);
    padding: 10px 14px;
    color: rgb(17, 24, 39);
    font-weight: 900;
    text-decoration: none;
}

.submission-zip-download.is-missing {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.15);
}

.submission-zip-download.is-missing span {
    color: rgb(248, 113, 113);
}

.submission-zip-download__empty {
    margin: 0;
    color: rgb(156, 163, 175);
}

.popup-area-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.popup-area-editor__toolbar button,
.popup-area-editor__remove {
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgb(229, 231, 235);
    font-weight: 700;
    cursor: pointer;
}

.popup-area-editor__toolbar button.is-active {
    border-color: rgb(251, 146, 60);
    background: rgba(249, 115, 22, 0.18);
    color: rgb(251, 191, 36);
}

.popup-area-editor__toolbar button.is-danger,
.popup-area-editor__remove {
    color: rgb(248, 113, 113);
}

.popup-area-editor__toolbar p {
    margin: 0;
    color: rgb(156, 163, 175);
    font-size: 13px;
}

.popup-area-editor__canvas {
    position: relative;
    overflow: hidden;
    width: min(var(--popup-width), 100%);
    aspect-ratio: var(--popup-aspect);
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

.popup-area-editor__canvas img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

.popup-area-editor__empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: rgb(156, 163, 175);
    text-align: center;
}

.popup-area-editor__area {
    position: absolute;
    border: 2px solid rgb(59, 130, 246);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.2);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.24);
    cursor: move;
}

.popup-area-editor__area.is-active {
    border-color: rgb(251, 191, 36);
    background: rgba(245, 158, 11, 0.22);
}

.popup-area-editor__area.is-draft {
    border-style: dashed;
    pointer-events: none;
}

.popup-area-editor__area span {
    position: absolute;
    top: -12px;
    left: -12px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    background: rgb(245, 158, 11);
    color: rgb(17, 24, 39);
    font-size: 13px;
    font-weight: 900;
}

.popup-area-editor__area i {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    border: 2px solid rgb(17, 24, 39);
    border-radius: 999px;
    background: rgb(251, 191, 36);
    cursor: nwse-resize;
}

.popup-area-editor__list {
    display: grid;
    gap: 12px;
}

.popup-area-editor__notice {
    margin: 0;
    color: rgb(156, 163, 175);
    font-size: 13px;
}

.popup-area-editor__item {
    display: grid;
    grid-template-columns: 120px repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.popup-area-editor__item.is-active {
    border-color: rgba(251, 191, 36, 0.6);
}

.popup-area-editor__item-title {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.14);
    color: rgb(251, 191, 36);
    font-weight: 900;
    cursor: pointer;
}

.popup-area-editor__item label {
    display: grid;
    gap: 6px;
    color: rgb(209, 213, 219);
    font-size: 12px;
    font-weight: 700;
}

.popup-area-editor__item input,
.popup-area-editor__item select {
    min-height: 38px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 0 10px;
    color: rgb(243, 244, 246);
}

@media (max-width: 1024px) {
    .popup-area-editor__item {
        grid-template-columns: 1fr 1fr;
    }
}
