/* 
 * AXELIDEA Patent Logo 共通スタイル
 * フォーム画面とレポート画面で共通利用
 * 最終更新: 2025-08-22
 */

/* ===== 基本スタイル（PC・タブレット用） ===== */
.axelidea-patent-logo-fixed {
    position: fixed;
    top: 90px;
    right: 35px;
    width: 280px;
    z-index: 9998;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 10px;
    max-height: 70px; /* 初期状態は折りたたみ */
    cursor: pointer;
}

/* PC：ホバー時の自動展開 */
@media (hover: hover) and (pointer: fine) {
    .axelidea-patent-logo-fixed:hover {
        max-height: 280px !important; /* 他のCSSの競合を防ぎ、高さも増加 */
        overflow: visible !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }
    
    .axelidea-patent-logo-fixed:hover .axelidea-patent-content {
        opacity: 1;
        max-height: 200px !important; /* 十分な高さを確保し、競合も防ぐ */
    }
}

/* タッチデバイス：クリック時に展開 */
.axelidea-patent-logo-fixed.expanded {
    max-height: 235px !important; /* 250px - 15px */
    overflow: visible !important;
    cursor: default;
}

/* ===== ロゴ画像 ===== */
.axelidea-patent-logo-fixed img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.axelidea-patent-logo-fixed:hover img {
    transform: scale(1.02);
}

/* ===== コンテンツ部分 ===== */
.axelidea-patent-content {
    padding: 15px 10px 10px !important; /* CSS読み込み順序の競合を防ぐ */
    text-align: center;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* 展開時のコンテンツ表示 */
.axelidea-patent-logo-fixed.expanded .axelidea-patent-content {
    opacity: 1;
    max-height: 200px !important; /* hover時と統一、競合も防ぐ */
}

/* タイトル */
.axelidea-patent-content h4 {
    font-size: 16px; /* 相対単位から絶対単位に変更 */
    margin: 0 0 15px 0;
    color: #333;
    font-weight: 600;
}

/* Powered by リンク */
.axelidea-patent-content a.powered-by {
    font-size: 13px; /* 相対単位から絶対単位に変更 */
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.axelidea-patent-content a.powered-by:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Powered by ボタン */
.powered-by-btn {
    background: transparent;
    border: none;
    color: #374151;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.powered-by-btn:hover {
    color: #009EF3;
    transform: translateY(-1px);
}

.powered-by-text {
    font-size: 1.2rem;
}

.axelidea-patent-text {
    font-size: 1.44rem;
    font-weight: 700;
}

/* お問い合わせボタン */
.axelidea-patent-content a.contact-link {
    font-size: 19px; /* 相対単位から絶対単位に変更 */
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid #007bff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.axelidea-patent-content a.contact-link:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* ===== リンクのクリック制御 ===== */
/* 初期状態ではリンククリック無効化 */
.axelidea-patent-logo-fixed:not(.expanded) a {
    pointer-events: none !important; /* タッチ時の一瞬のhoverも無視 */
}

/* 展開時のみリンク有効化 */
.axelidea-patent-logo-fixed.expanded a {
    pointer-events: auto !important;
}

/* ===== モバイル用レスポンシブ対応 ===== */
@media (max-width: 768px) {
    .axelidea-patent-logo-fixed {
        position: fixed;
        top: 67px; /* ヘッダー62px + 余白5px */
        bottom: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: calc(92% - 2rem);
        max-width: 600px;
    }
    
    .axelidea-patent-logo-fixed:hover {
        transform: translateX(-50%) translateY(-2px);
    }
    
    .axelidea-patent-logo-fixed.expanded {
        max-height: 205px; /* 220px - 15px */
    }
}

/* さらに小さい画面用 */
@media (max-width: 480px) {
    .axelidea-patent-logo-fixed {
        width: calc(100% - 2rem);
        left: 1rem;
        transform: none;
        bottom: 50px;
    }
    
    .axelidea-patent-logo-fixed:hover {
        transform: translateY(-2px);
    }
    
    /* モバイルではコンテンツのフォントサイズ調整 */
    .axelidea-patent-content h4 {
        font-size: 14px; /* 相対単位から絶対単位に変更 */
    }
    
    .axelidea-patent-content a.contact-link {
        font-size: 17px; /* 相対単位から絶対単位に変更 */
        padding: 6px 16px;
    }
}