

/* メインコンテナ */
.sgrp-media-edit-modal-image-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 画像フレーム */
.sgrp-media-edit-modal-image-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 28px 0 20px 0;
    overflow: hidden;
    box-sizing: border-box;
}

.sgrp-media-edit-modal-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 617px;
    width: 100%;
    position: relative;
}

.sgrp-media-edit-modal-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sgrp-media-edit-modal-image-base,
.sgrp-media-edit-modal-image-mask,
.sgrp-media-edit-modal-image-effect {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 入力はeffectキャンバスで受ける */
.sgrp-media-edit-modal-image-base,
.sgrp-media-edit-modal-image-mask {
    pointer-events: none;
}
.sgrp-media-edit-modal-image-effect {
    pointer-events: auto;
}
.sgrp-media-edit-modal-image-mask,
.sgrp-media-edit-modal-image-effect {
    opacity: 0.7;
}

/* コントロールバー */
.sgrp-media-edit-modal-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 20px 0;
    box-sizing: border-box;
}

.sgrp-media-edit-modal-control-left {
    display: flex;
    align-items: center;
}

.sgrp-media-edit-modal-brush-tools {
    background: var(--color-soft-white);
    display: flex;
    gap: 4px;
    height: 34px;
    align-items: center;
    overflow: hidden;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.1);
}

.sgrp-media-edit-modal-brush-tool {
    width: 24px;
    height: 24px;
    background: transparent;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
}

.sgrp-media-edit-modal-brush-tool.selected {
    background: var(--color-gray-200);
}

.sgrp-media-edit-modal-brush-tool svg {
    width: 20px;
    height: 20px;
    display: block;
    max-width: none;
}

.sgrp-media-edit-modal-slider-container {
    display: flex;
    gap: 3px;
    height: 24px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 4px;
    border-radius: 25px;
    box-sizing: border-box;
}

.sgrp-media-edit-modal-slider-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: calc(200px - 16px);
    height: 5px;
    margin: 0 8px;
}

.sgrp-media-edit-modal-slider-track {
    background: var(--color-gray-200);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    overflow: hidden;
    height: 5px;
    border-radius: 25px;
    width: calc(200px - 16px);
    cursor: pointer;
}

.sgrp-media-edit-modal-slider-fill {
    background: var(--color-soft-black);
    height: 100%;
    border-radius: 25px;
    width: 149px;
}

.sgrp-media-edit-modal-slider-handle {
    position: absolute;
    left: calc(50% + 34px);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--color-soft-black);
    border-radius: 50%;
    cursor: pointer;
}

.sgrp-media-edit-modal-slider-value {
    display: flex;
    flex-direction: column;
    font-family: var(--font-base);
    font-weight: 500;
    justify-content: center;
    line-height: 0;
    font-style: normal;
    font-size: 12px;
    text-align: center;
    color: var(--color-soft-black);
    width: 28px;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.sgrp-media-edit-modal-slider-value:hover,
.sgrp-media-edit-modal-slider-value:focus {
    background: transparent;
    border: 1px solid var(--color-gray-200);
    border-radius: 3px;
    padding: 0;
    cursor: text;
}

/* 右側コントロール */
.sgrp-media-edit-modal-control-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-self: stretch;
}

.sgrp-media-edit-modal-action-button {
    border: 1px solid var(--color-gray-200);
    height: 34px;
    border-radius: 6px;
    background: transparent;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px 12px;
    box-sizing: border-box;
    cursor: pointer;
    margin-left: 10px;
}

.sgrp-media-edit-modal-action-button:hover {
    background-color: var(--color-gray-100);
}

.sgrp-media-edit-modal-action-button:active {
    background-color: var(--color-gray-100);
}

.sgrp-media-edit-modal-action-button:first-child {
    margin-left: 0;
}

.sgrp-media-edit-modal-action-button svg {
    width: 16px;
    height: 16px;
    display: block;
    max-width: none;
}

.sgrp-media-edit-modal-action-button span {
    display: flex;
    flex-direction: column;
    font-family: var(--font-base);
    font-weight: 500;
    justify-content: center;
    line-height: 0;
    font-style: normal;
    font-size: 12px;
    text-align: center;
    color: var(--color-soft-black);
    white-space: nowrap;
}

/* Cut インディケーター */
.sgrp-media-edit-modal-cut-indicator {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 0 0 28px 0;
    box-sizing: border-box;
}

.sgrp-media-edit-modal-cut-label {
    background: var(--color-soft-black);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 50px;
    min-width: 72px;
    height: 25px;
    box-sizing: border-box;
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    color: white;
    line-height: 1.2;
    white-space: nowrap;
}
