/* キャラクターアセットページスタイル */

.asset-character-page {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 0 0 0;
    box-sizing: border-box;
}

.asset-character-page-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.asset-character-page-top {
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 0 30px;
}

.asset-character-page-title {
    flex: 1;
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-soft-black);
    margin: 0;
    white-space: pre-wrap;
}

.asset-character-page-asset-container {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 30px;
    box-sizing: border-box;
}

.asset-character-page-asset-box {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.asset-character-page-asset-row {
    display: flex;
    gap: 26px;
    width: 100%;
}

/* キャラクターカード */
.asset-character-card {
    position: relative;
    width: 180px;
    height: 224px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    cursor: pointer;
    border: 1px solid var(--color-gray-100);
    background: var(--color-gray-100);
}

/* サイドバー折りたたみ時にカードを拡大 */
.sidebar.collapsed ~ .content-area .asset-character-card {
    width: 201px;
    height: 250px;
}

.asset-character-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    pointer-events: none;
}

/* グラデーションオーバーレイ */
.asset-character-card-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 69.712%,
        rgba(0, 0, 0, 0.5) 100%
    );
    border-radius: 6px;
    pointer-events: none;
}

/* 下部コンテナ */
.asset-character-card-bottom-container {
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    gap: 8px;
}

/* キャラクター名（左下） */
.asset-character-card-name-text {
    flex: 1;
    min-width: 0;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-soft-white);
    line-height: 1.8;
    text-align: left;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* 編集ボタン（右下、ホバー時表示） */
.asset-character-card-edit-button {
    padding: 3px 8px;
    border-radius: 25px;
    border: 1px solid var(--color-soft-white);
    background: transparent;
    font-family: var(--font-base);
    font-size: 10px;
    font-weight: 500;
    color: var(--color-soft-white);
    line-height: 1.2;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.asset-character-card:hover .asset-character-card-edit-button {
    opacity: 1;
}

.asset-character-card-edit-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 削除ボタン（右上、ホバー時表示） */
.asset-character-card-delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.asset-character-card:hover .asset-character-card-delete-button {
    opacity: 1;
}

.asset-character-card-delete-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 空メッセージ */
.asset-character-page-empty-message {
    padding: 40px 20px;
    text-align: center;
    font-family: var(--font-base);
    font-size: 14px;
    color: var(--color-gray-600);
}



/* キャラクター修正モーダルスタイル */

.character-edit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.character-edit-modal-overlay.show {
    opacity: 1;
}

.character-edit-modal-overlay.closing {
    opacity: 0;
}

.character-edit-modal {
    background: var(--color-soft-white);
    border-radius: 12px;
    box-shadow: 4px 0px 8px 0px rgba(0, 0, 0, 0.08);
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

/* タイトル */
.character-edit-modal-title {
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-soft-black);
    margin: 0;
    height: 24px;
}

/* コンテンツ（画像+フォーム） */
.character-edit-modal-content {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

/* 画像ボックス */
.character-edit-image-box {
    width: 317px;
    height: 424px;
    border-radius: 8px;
    border: 1px solid var(--color-gray-100);
    background: var(--color-gray-100);
    overflow: hidden;
    flex-shrink: 0;
}

.character-edit-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

/* フォームコンテナ */
.character-edit-form-container {
    width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

/* フォーム行 */
.character-edit-form-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* CharacterFormFieldsレイアウト */
.character-edit-form-row .character-form-field:first-child {
    width: 245px;
    flex-shrink: 0;
}

.character-edit-form-row .character-form-field:nth-child(2),
.character-edit-form-row .character-form-field:nth-child(3) {
    flex: 1;
}
