/**
 * Profile Share Menu - CSS
 * シェアメニューのスタイル
 */

/* ===== シェアメニューラッパー ===== */
.profile-share-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* 右上配置用 */
.profile-share-wrapper.position-top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* ===== シェアアイコン ===== */
.profile-share-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.profile-share-icon:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.profile-share-icon:active {
    transform: scale(0.95);
}

.profile-share-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    color: #6b7280;
}

.profile-share-icon:hover svg {
    color: #1f2937;
}

/* ===== シェアメニュー本体 ===== */
.profile-share-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.profile-share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-share-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.profile-share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.profile-share-menu-item:hover {
    background-color: #f9fafb;
}

.profile-share-menu-item:active {
    background-color: #e5e7eb;
    transform: scale(0.98);
}

.profile-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.profile-menu-icon svg,
.profile-menu-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

/* ===== SNS別のアイコン色 ===== */
.profile-share-twitter .profile-menu-icon svg {
    color: #000000;
}

.profile-share-facebook .profile-menu-icon svg {
    color: #1877f2;
}

.profile-share-instagram .profile-menu-icon svg {
    color: #e4405f;
}

/* ===== 通報ボタン（メニュー内） ===== */
.profile-share-menu-item.report-button {
    color: #dc2626;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 12px;
}

.profile-share-menu-item.report-button:hover {
    background-color: #fef2f2;
}

.profile-share-menu-item.report-button .profile-menu-icon svg {
    color: #dc2626;
}

/* ===== レスポンシブ調整 ===== */

/* 極小画面（320px以下） */
@media (max-width: 320px) {
    .profile-share-wrapper.position-top-right {
        top: 8px;
        right: 8px;
    }
    
    .profile-share-icon {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .profile-share-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .profile-share-menu {
        min-width: 200px;
        right: -8px;
    }
    
    .profile-share-menu-item {
        padding: 10px 14px;
        font-size: 13px;
        gap: 10px;
    }
    
    .profile-menu-icon {
        width: 18px;
        height: 18px;
    }
    
    .profile-menu-icon svg,
    .profile-menu-icon img {
        width: 18px;
        height: 18px;
    }
}

/* スマホ（321px〜480px） */
@media (min-width: 321px) and (max-width: 480px) {
    .profile-share-wrapper.position-top-right {
        top: 8px;
        right: 8px;
    }
    
    .profile-share-icon {
        width: 38px;
        height: 38px;
        padding: 7px;
    }
    
    .profile-share-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .profile-share-menu {
        min-width: 220px;
    }
}

/* タブレット・デスクトップ */
@media (min-width: 769px) {
    .profile-share-wrapper.position-top-right {
        top: 15px;
        right: 15px;
    }
    
    .profile-share-icon:hover {
        transform: scale(1.1);
    }
}

/* ===== アニメーション ===== */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-share-menu.active {
    animation: slideDownFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ダークモード対応 ===== */
@media (prefers-color-scheme: dark) {
    .profile-share-icon {
        background: rgba(31, 41, 55, 0.95);
        border-color: #374151;
    }
    
    .profile-share-icon:hover {
        background: #1f2937;
    }
    
    .profile-share-icon svg {
        color: #d1d5db;
    }
    
    .profile-share-icon:hover svg {
        color: #f9fafb;
    }
    
    .profile-share-menu {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .profile-share-menu-item {
        color: #f9fafb;
    }
    
    .profile-share-menu-item:hover {
        background-color: #374151;
    }
    
    .profile-share-menu-item:active {
        background-color: #4b5563;
    }
    
    .profile-share-menu-item.report-button {
        border-color: #374151;
    }
    
    .profile-share-menu-item.report-button:hover {
        background-color: rgba(220, 38, 38, 0.1);
    }
}

/* ===== アクセシビリティ ===== */
.profile-share-icon:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.profile-share-menu-item:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

/* ===== プリント時は非表示 ===== */
@media print {
    .profile-share-wrapper {
        display: none !important;
    }
}

/* ===== インライン配置用（オプション） ===== */
.profile-share-wrapper.inline {
    position: relative;
    display: inline-flex;
}

.profile-share-wrapper.inline .profile-share-menu {
    top: calc(100% + 4px);
}

/* =========================================================
   Design Tune (2026-01-21)
   影なし / 余白調整 / トグル周りborderなし / ヘッダーに馴染ませる
   ※既存デザインを上書き
   ========================================================= */

/* トグル（︙）: 枠線なし・影なし・コンパクト */
.profile-share-icon{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 36px !important;
    height: 36px !important;
    padding: 6px !important;
    border-radius: 10px !important;
    transition: background-color 0.2s ease !important;
}

.profile-share-icon:hover{
    background: rgba(0,0,0,0.04) !important;
    box-shadow: none !important;
    transform: none !important;
}

.profile-share-icon:active{
    transform: none !important;
}

.profile-share-icon svg{
    width: 20px !important;
    height: 20px !important;
    color: #111827 !important;
}

/* メニュー本体: 影なし・余白整理・薄い境界線 */
.profile-share-menu{
    box-shadow: none !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px !important;
    min-width: 220px !important;
}

/* メニューの上下余白を詰める */
.profile-share-menu ul{
    padding: 6px 0 !important;
}

/* メニュー項目: 余白/整列を整える */
.profile-share-menu-item{
    padding: 10px 14px !important;
    gap: 10px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* hoverは薄く */
.profile-share-menu-item:hover{
    background: rgba(0,0,0,0.04) !important;
}

/* アイコン領域を揃える */
.profile-menu-icon{
    width: 18px !important;
    height: 18px !important;
}

.profile-menu-icon svg,
.profile-menu-icon img{
    width: 18px !important;
    height: 18px !important;
}

/* 通報境界線も薄く */
.profile-share-menu-item.report-button{
    border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* ダークモード: 影なし＆境界線/hover調整 */
@media (prefers-color-scheme: dark){
    .profile-share-icon{
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .profile-share-icon:hover{
        background: rgba(255,255,255,0.06) !important;
    }

    .profile-share-icon svg{
        color: #e5e7eb !important;
    }

    .profile-share-menu{
        box-shadow: none !important;
        border: 1px solid rgba(255,255,255,0.10) !important;
    }

    .profile-share-menu-item:hover{
        background: rgba(255,255,255,0.06) !important;
    }

    .profile-share-menu-item.report-button{
        border-top: 1px solid rgba(255,255,255,0.10) !important;
    }
}