/**
 * CTR最適化アフィリエイトボタン スタイル
 *
 * [affiliate_button] ショートコード用。
 * Tailwind CSSベースのデザインをVanilla CSSに変換。
 */

/* =================================================================
   共通
   ================================================================= */
.ermu-aff-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    margin: 1.5em auto;
}

/* =================================================================
   Type 1: 王道・高コントラスト型（オレンジ）
   ================================================================= */
.ermu-aff-btn--type1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, #fb923c, #f97316);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ermu-aff-btn--type1:hover,
.ermu-aff-btn--type1:focus {
    background: linear-gradient(to bottom, #f97316, #ea580c);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.ermu-aff-btn--type1 .ermu-aff-btn__icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ermu-aff-btn--type1:hover .ermu-aff-btn__icon {
    transform: scale(1.1);
}

.ermu-aff-btn--type1 .ermu-aff-btn__text {
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

/* =================================================================
   Type 2: 信頼感・マイクロコピー併用型（サイト基調色）
   ================================================================= */
.ermu-aff-btn--type2-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ermu-aff-btn__microcopy-top {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.ermu-aff-btn__shield-icon {
    width: 1rem;
    height: 1rem;
    color: #22c55e;
    flex-shrink: 0;
}

.ermu-aff-btn--type2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: #508BC2;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ermu-aff-btn--type2:hover,
.ermu-aff-btn--type2:focus {
    background-color: #3d6e9e;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    color: #fff;
    text-decoration: none;
}

.ermu-aff-btn--type2 .ermu-aff-btn__arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ermu-aff-btn--type2:hover .ermu-aff-btn__arrow-icon {
    transform: translateX(4px);
}

.ermu-aff-btn__microcopy-bottom {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* =================================================================
   Type 3: 緊急性・ベネフィット強調型（レッド系）
   ================================================================= */
.ermu-aff-btn--type3 {
    display: block;
    width: 100%;
    background: linear-gradient(to right, #f43f5e, #dc2626);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.ermu-aff-btn--type3:hover,
.ermu-aff-btn--type3:focus {
    background: linear-gradient(to right, #e11d48, #b91c1c);
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.5);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* キラッと光るエフェクト */
.ermu-aff-btn__shimmer {
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.ermu-aff-btn--type3:hover .ermu-aff-btn__shimmer {
    animation: ermu-shimmer 1.5s infinite;
}

@keyframes ermu-shimmer {
    100% {
        transform: translateX(100%) skewX(-12deg);
    }
}

.ermu-aff-btn__type3-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    position: relative;
    z-index: 1;
}

.ermu-aff-btn__type3-left {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.ermu-aff-btn__type3-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 228, 230, 1);
    margin-bottom: 0.125rem;
}

.ermu-aff-btn__clock-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

.ermu-aff-btn__type3-main-text {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

/* 割引バッジ */
.ermu-aff-btn__type3-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.ermu-aff-btn__type3-badge-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ermu-aff-btn__type3-badge-value {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.3s ease;
}

.ermu-aff-btn--type3:hover .ermu-aff-btn__type3-badge-value {
    transform: scale(1.1);
}

/* =================================================================
   レスポンシブ
   ================================================================= */
@media (max-width: 480px) {
    .ermu-aff-btn {
        max-width: 100%;
    }

    .ermu-aff-btn--type1 .ermu-aff-btn__text {
        font-size: 0.9375rem;
    }

    .ermu-aff-btn--type3 .ermu-aff-btn__type3-main-text {
        font-size: 1.0625rem;
    }

    .ermu-aff-btn--type3 .ermu-aff-btn__type3-badge-value {
        font-size: 1.25rem;
    }
}
