/* ============================================================
   FotoMalta — Share Button Component
   Add <link rel="stylesheet" href="/assets/css/share.css">
   to any page that uses includes/share-btn.php
   ============================================================ */

.fm-share-wrap {
    position: relative;
    display: inline-block;
}

/* Trigger button */
.fm-share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: rgba(253, 246, 236, .92);
    border: 1.5px solid #c8a878;
    border-radius: 20px;
    color: #7a5230;
    font-family: 'Lora', serif;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, box-shadow .18s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.fm-share-trigger:hover {
    background: #f5ede0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.fm-share-trigger:focus-visible {
    outline: 2px solid #c8893e;
    outline-offset: 2px;
}

/* Dropdown menu */
.fm-share-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #fdf6ec;
    border: 1px solid #d6c4a8;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    padding: 6px 0;
    z-index: 9999;
    animation: fmShareIn .14s ease;
}
.fm-share-menu[hidden] { display: none; }

@keyframes fmShareIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Menu items */
.fm-share-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 16px;
    font-family: 'Lora', serif;
    font-size: .83rem;
    color: #3a1f0a;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
    box-sizing: border-box;
}
.fm-share-item:hover,
.fm-share-item:focus-visible {
    background: #f5ede0;
    color: var(--share-color, #7a5230);
    outline: none;
}
.fm-share-item svg {
    color: var(--share-color, #c8893e);
    flex-shrink: 0;
}

/* E-card special style */
.fm-share-ecard {
    --share-color: #c8893e;
    font-weight: 600;
}

/* Copied state */
.fm-copy-link.copied { color: #155724; }
.fm-copy-link.copied svg { color: #155724; }

/* Divider */
.fm-share-hr {
    border: none;
    border-top: 1px solid #e8d5b8;
    margin: 4px 0;
}

/* ── On dark photo overlays (e.g. gallery hover) ── */
.photo-overlay .fm-share-trigger {
    background: rgba(0,0,0,.55);
    border-color: rgba(255,255,255,.3);
    color: #fdf6ec;
}
.photo-overlay .fm-share-trigger:hover {
    background: rgba(0,0,0,.75);
}
