@charset "UTF-8";

/* ==========================================================================
   詳細画面（タグ用）とダッシュボード（購入用）共通のポップアップ制御CSS
   修正内容:
    - .modal-open を .is-active に統一（main.js / work-tags.js の制御方式に合わせる）
    - 不要な !important を削除し、通常のCSSカスケードに従う形に整理
   ========================================================================== */

/* ① 初期状態: 非表示（クラスベースで詳細度を統一） */
.modal-overlay {
    display: none;
}

/* ② JS から .is-active クラスが付与された時だけ表示する
      詳細度: (0,2,0) = 20点 → ①の(0,1,0)=10点に勝つので正しく表示される */
.modal-overlay.is-active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* ③ 白いポップアップカード本体のスタイル */
.modal-wrapper,
.modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: modalAppear 0.2s ease-out;
}

/* ④ 閉じるボタン */
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.modal-close-btn:hover {
    background-color: #f1f5f9;
    color: #475569;
}

/* ⑥ Stripeチェックアウトボタン */
.btn-stripe-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #635bff 0%, #7c73ff 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.4), 0 1px 3px rgba(99, 91, 255, 0.2);
    letter-spacing: 0.01em;
}

.btn-stripe-checkout:hover {
    background: linear-gradient(135deg, #5249e5 0%, #635bff 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 91, 255, 0.45), 0 2px 6px rgba(99, 91, 255, 0.2);
}

.btn-stripe-checkout:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.35);
}

/* ⑥ 表示アニメーション */
@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.95) translateY(4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}
