/**
 * dgs-myaccount.css
 * サブスクリプション マイアカウントページ スタイル
 *
 * Copyright (C) 2024 Done-TOMOYUKI YONEI. All rights reserved.
 */

/* =========================================================
   周期選択セレクター
   ========================================================= */

.dgs-cycle-selector {
    text-align: center;
    margin-bottom: 20px;
}

.dgs-cycle-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dgs-cycle-buttons .dgs-cycle-options,
.dgs-cycle-buttons > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.dgs-cycle-buttons p {
    text-align: center;
}

/* =========================================================
   フレーバー選択セレクター
   ========================================================= */

.dgs-flavor-selector {
    text-align: center;
    margin-top: 32px;
    margin-bottom: 20px;
}

.dgs-flavor-selector > p:first-child {
    margin-bottom: 4px;
}

.dgs-flavor-selector > div {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

/* ステータスバッジ */
.dgs-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.dgs-active {
    background: #e6f4ea;
    color: #1a7a34;
}

.dgs-failed {
    background: #fff3e0;
    color: #bf6a00;
}

.dgs-cancelled {
    background: #f0f0f0;
    color: #666;
}

/* サブスクテーブル */
.dgs-subscription-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.dgs-subscription-table th,
.dgs-subscription-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.dgs-subscription-table thead th {
    background: #f5f5f5;
    font-weight: bold;
}

/* ボタン */
.dgs-btn-small {
    font-size: 12px !important;
    padding: 4px 10px !important;
    margin-right: 6px !important;
}

.dgs-btn-cancel {
    background: #c00 !important;
    border-color: #a00 !important;
    color: #fff !important;
}

.dgs-btn-cancel:hover {
    background: #a00 !important;
    color: #fff !important;
}

/* カード入力フォーム */
#dgs-card-fields {
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

#dgs-card-fields h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

#dgs-change-card-form .form-row {
    margin-bottom: 14px;
}

#dgs-change-card-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}
