.index2-loading-types-list {
    border: 1px solid #e2d5ec;
    border-radius: 10px;
    background: #f8f2fc;
}

.index2-loading-type-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
}

.index2-loading-type-row + .index2-loading-type-row {
    border-top: 1px solid #e7deef;
}

.index2-loading-type-image-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
}

.index2-loading-type-image-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.index2-loading-type-title {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.2;
}

.index2-loading-type-switch {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 20px;
    margin: 0;
    flex: 0 0 auto;
}

.index2-loading-type-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.index2-loading-type-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #9a9a9a;
    transition: background-color 0.2s ease;
}

.index2-loading-type-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.index2-loading-type-switch input:checked + .index2-loading-type-slider {
    background: #8d4f9e;
}

.index2-loading-type-switch input:checked + .index2-loading-type-slider::before {
    transform: translateX(16px);
}

.index2-loading-preview {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.index2-loading-preview-open {
    overflow: hidden;
}

.index2-loading-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.index2-loading-preview-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 760px);
    max-height: 88vh;
    background: #fff;
    border-radius: 6px;
    padding: 10px;
}

.index2-loading-preview-close {
    position: absolute;
    right: 8px;
    top: 4px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #666;
}

#index2-loading-preview-image {
    width: 100%;
    max-height: 74vh;
    object-fit: contain;
    display: block;
}

.index2-loading-preview-title {
    margin-top: 8px;
    font-size: 16px;
    text-align: center;
    color: #444;
}

@media (max-width: 767px) {
    .index2-loading-type-image-btn {
        width: 32px;
        height: 32px;
    }

    .index2-loading-type-switch {
        width: 34px;
        height: 18px;
    }

    .index2-loading-type-slider::before {
        top: 2px;
        left: 2px;
        width: 14px;
        height: 14px;
    }

    .index2-loading-type-switch input:checked + .index2-loading-type-slider::before {
        transform: translateX(16px);
    }

    .index2-loading-type-title {
        font-size: 14px;
    }

    .index2-loading-preview-dialog {
        width: min(96vw, 760px);
        max-height: 90vh;
        border-radius: 8px;
        padding: 8px;
    }

    .index2-loading-preview-close {
        right: 4px;
        top: 2px;
        font-size: 24px;
    }

    #index2-loading-preview-image {
        max-height: 78vh;
    }

    .index2-loading-preview-title {
        margin-top: 6px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .index2-loading-type-row {
        gap: 8px;
        padding: 7px 8px;
    }

    .index2-loading-type-title {
        font-size: 13px;
    }

    .index2-loading-preview-dialog {
        width: calc(100vw - 10px);
        padding: 6px;
    }
}
