/* ==============================
   Modal base + animations
   ============================== */

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    animation: fadeIn 0.25s ease forwards;
}

.photo-modal.closing {
    animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.photo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
}

/* ==============================
   Modal container
   ============================== */

.photo-modal__box {
    position: relative;
    max-width: 92%;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

/* ==============================
   Image (centered)
   ============================== */

.photo-modal__box img {
    display: block;
    max-width: 100%;
    max-height: 65vh;
    margin: 0 auto;
}

/* ==============================
   Action bar layout
   ============================== */

.photo-modal__actions {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px 16px;
    background: #000;
}

/* Mobile: slimmer bar */
@media (max-width: 768px) {
    .photo-modal__actions {
        padding: 10px 12px;
    }
}

/* ==============================
   Share group (centered)
   ============================== */

.share-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* ==============================
   Share label
   ============================== */

.share-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.95;
}

.share-label svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ==============================
   Icon buttons (FB, X, Close)
   ============================== */

.icon-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn svg {
    width: 26px;
    height: 26px;
    fill: #000;
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* Facebook: heavier visual weight */
.icon-btn.fb svg {
    width: 28px;
    height: 28px;
    fill: #1877f2;
}

/* X icon */
.icon-btn.x svg {
    width: 26px;
    height: 26px;
    fill: #000;
}

/* ==============================
   Tooltips
   ============================== */

.icon-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -36px;              /* move above */
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #111;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity .15s ease, transform .15s ease;
}

.icon-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ==============================
   Close button (right aligned)
   ============================== */

.icon-btn.close {
    justify-self: end;
    background: transparent;
}

.icon-btn.close svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/* ==============================
   Lock background scroll
   ============================== */

body.photo-modal-open {
    overflow: hidden;
}
/* ==============================
   Image share overlay
   ============================== */

#photos {
    position: relative;
}

#photos img {
    cursor: pointer;
}

/* Wrapper created by JS */
.photo-share-wrapper {
    position: relative;
    display: inline-block;
}
.photo-share-wrapper {
    overflow: hidden;
}
.photo-share-overlay {
    position: absolute;
    bottom: 17px;               /* pull overlay further inside */
    right: 7px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1;             /* prevent vertical overflow */
    pointer-events: none;
    transition: background .15s ease, opacity .15s ease;
}


.photo-share-overlay svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

/* Desktop hover affordance */
@media (hover: hover) {
    .photo-share-wrapper:hover .photo-share-overlay {
        background: rgba(0,0,0,0.9);
    }
}

