/*
 * PDF ダウンロードボタン — Web 表示用スタイル
 */

/* ── ラッパー：画面右下に固定表示 ── */
#cp-pdf-wrapper {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
}

/* ── ボタン本体 ── */
.cp-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background-color: #1a4c7a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    white-space: nowrap;
}

.cp-pdf-btn:hover {
    background-color: #2c5f8a;
    transform: translateY(-2px);
    color: #ffffff;
}

.cp-pdf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cp-pdf-btn:disabled {
    background-color: #7a9dbf;
    cursor: not-allowed;
    transform: none;
}

/* ── アイコン ── */
.cp-pdf-btn-icon {
    font-size: 17px;
    line-height: 1;
}

/* ── ローディング表示 ── */
.cp-pdf-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cp-pdf-btn-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cp-pdf-spin 0.7s linear infinite;
}

@keyframes cp-pdf-spin {
    to { transform: rotate(360deg); }
}

/* ── エラートースト ── */
#cp-pdf-error {
    position: fixed;
    bottom: 90px;
    right: 32px;
    z-index: 9999;
    background-color: #c0392b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 320px;
    display: none;
}

/* ── レスポンシブ ── */
@media (max-width: 480px) {
    #cp-pdf-wrapper {
        bottom: 16px;
        right: 16px;
    }

    .cp-pdf-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
