/**
 * プランアイテム
 */

 .tok-plan-item {
    display: flex;
    gap: 30px;
    width: 100%;
    padding: 40px 20px;
    border-bottom: 1px solid #eee;
}

.tok-plan-item:last-child {
    border-bottom: none;
}

.tok-plan-item-header {
    width: 250px;
    flex: none;
}

.tok-plan-item-title {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
}

.tok-plan-item-price {
    font-size: 14px;
}

.tok-plan-item-catchphrase {
    margin-bottom: .75em;
    font-weight: 500;
}

.tok-plan-item-description {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}

/* ===========================
   動画エリア
   =========================== */

.tok-plan-item-video-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.tok-plan-item-video-controls .components-base-control {
    margin-bottom: 10px;
}

.tok-plan-item-videos {
    margin: 20px 0;
}

.tok-plan-item-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tok-plan-item-video-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    cursor: pointer;
}

.tok-plan-item-video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tok-plan-item-video-item:hover img {
    transform: scale(1.05);
}

/* エディタでの動画コントロール */
.tok-plan-item-video-item-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 5px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
}

.tok-plan-item-video-item-controls button {
    flex: 1;
    min-height: 30px;
}

/* フロントの再生アイコン */
.tok-plan-item-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #000;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tok-plan-item-video-item:hover .tok-plan-item-video-play-icon {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ===========================
   アコーディオン部分
   =========================== */

.tok-plan-item-more {
    margin-top: 20px;
}

.tok-plan-item-more-header {
    font-size: 0.9rem;
    color: #494949;
    cursor: pointer;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #494949;
    border-radius: 4px;
    transition: background 0.3s;
}

.tok-plan-item-more-header:hover {
    background: #e8e8e8;
}

.tok-plan-item-more-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* 閉じている時 */
[data-open="closed"] .tok-plan-item-more-body {
    max-height: 0;
    opacity: 0;
    padding: 0 15px;
}

/* 開いている時 */
[data-open="open"] .tok-plan-item-more-body {
    max-height: 1000px;
    opacity: 1;
    padding: 20px 15px;
}

/* ===========================
   エディタ内スタイル
   =========================== */

.editor-styles-wrapper .tok-plan-item {
    outline: 1px dashed #e0e0e0;
    margin-bottom: 20px;
}

.editor-styles-wrapper .tok-plan-item-title,
.editor-styles-wrapper .tok-plan-item-price,
.editor-styles-wrapper .tok-plan-item-description {
    outline: 1px dashed #ddd;
    padding: 8px;
    min-height: 30px;
}

/* エディタ内では詳細エリアを常に表示 */
.editor-styles-wrapper .tok-plan-item-more-body {
    max-height: none !important;
    opacity: 1 !important;
    padding: 15px !important;
    outline: 1px dashed #ddd;
    margin-top: 10px;
}

/* ===========================
   レスポンシブ
   =========================== */

@media (max-width: 768px) {
    .tok-plan-item {
        flex-direction: column;
        padding: 30px 15px;
        gap: 15px;
    }
    
    .tok-plan-item-header {
        width: 100%;
    }
    
    .tok-plan-item-title {
        margin-bottom: 0;
        font-size: 1rem;
        font-weight: 500;
    }
    
    .tok-plan-item-price {
        font-size: .95rem;
    }
    
    .tok-plan-item-description {
        font-size: .85rem;
    }
    
    /* 動画グリッドを1列に */
    .tok-plan-item-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .tok-plan-item-video-play-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}