/* validation-button.css - バリデーション付きボタンのスタイル */

/* ボタンラッパー */
.validation-btn-wrapper {
    position: relative;
    width: 100%;
}

/* 無効ボタンクリック時の赤い点滅アニメーション */
@keyframes shake-flash {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes red-flash {
    0%, 100% {
        background: radial-gradient(circle, #ff6666 0%, #ff3333 50%, #cc0000 100%);
        box-shadow: 0 0 10px rgba(255, 51, 51, 0.8),
                    0 0 20px rgba(255, 51, 51, 0.4),
                    inset 0 0 10px rgba(255, 100, 100, 0.5);
    }
    50% {
        background: radial-gradient(circle, #ff8888 0%, #ff5555 50%, #ee0000 100%);
        box-shadow: 0 0 30px rgba(255, 51, 51, 0.9),
                    0 0 60px rgba(255, 51, 51, 0.7),
                    inset 0 0 25px rgba(255, 100, 100, 0.8);
    }
}

/* 無効ボタンクリック時のアニメーション (通常ボタン用) */
.validation-btn-disabled-click {
    animation: shake-flash 0.5s ease-in-out;
}

/* illuminated-button 用のアニメーション */
.validation-btn-disabled-click .button-body {
    animation: shake-flash 0.5s ease-in-out;
}

.validation-btn-disabled-click .button-light {
    animation: red-flash 0.5s ease-in-out !important;
}

/* aria-disabled状態のボタンスタイル（赤ボタンの場合は暗くしない） */
.validation-button[aria-disabled="true"] {
    cursor: not-allowed;
}

/* aria-disabled状態でilluminated-buttonの光を暗くする（青ボタンのみ） */
.validation-button[aria-disabled="true"].blue {
    opacity: 0.5;
}

.validation-button[aria-disabled="true"].blue .button-light {
    opacity: 0.3;
}

/* ボタンのツールチップ */
.validation-btn-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 300px;
    min-width: 250px;
    width: max-content;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: normal;
    word-wrap: break-word;
}

/* カスタムツールチップ背景色 */
.validation-btn-tooltip.custom-bg {
    background: var(--tooltip-bg-color, rgba(0, 0, 0, 0.9));
}

/* カスタムツールチップ文字色 */
.validation-btn-tooltip.custom-color {
    color: var(--tooltip-text-color, white);
}

.validation-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* カスタム矢印色 */
.validation-btn-tooltip.custom-bg::after {
    border-top-color: var(--tooltip-bg-color, rgba(0, 0, 0, 0.9));
}

.validation-btn-tooltip.show {
    opacity: 1;
}

.validation-btn-tooltip ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.validation-btn-tooltip li {
    margin: 4px 0;
}

/* モバイル対応 */
@media (max-width: 640px) {
    .validation-btn-tooltip {
        max-width: calc(100vw - 60px);
        min-width: auto;
        width: calc(100vw - 60px);
        left: 50%;
        transform: translateX(-50%);
        font-size: 13px;
    }

    .validation-btn-tooltip::after {
        left: 50%;
    }
}

/* タブレット対応 */
@media (max-width: 768px) {
    .validation-btn-tooltip {
        max-width: 280px;
        min-width: 200px;
    }
}

/* .btn.btn-primary用の赤/青ボタンスタイル */
.btn.btn-primary.red {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4) !important;
}

.btn.btn-primary.red:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5) !important;
}

.btn.btn-primary.blue {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}

.btn.btn-primary.blue:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5) !important;
}

/* aria-disabled状態の赤ボタンは通常のまま */
.btn.btn-primary.red[aria-disabled="true"] {
    opacity: 1;
}

/* aria-disabled状態の青ボタンは少し暗く */
.btn.btn-primary.blue[aria-disabled="true"] {
    opacity: 0.7;
}

/* トライアル日数テキストのスタイル（空白を完全に削除） */
.trial-days-text {
    display: contents;
    margin: 0;
    padding: 0;
    letter-spacing: 0;
    word-spacing: 0;
}
