/**
 * Heritage Photo Bookmark - Frontend Stylesheet (v2.8.3 - Masonry Hotfix)
 */

/*
 * ===================================================================
 * YOUR THEME COLOR
 * ===================================================================
 * Find your theme's accent color (e.g., from the WordPress Customizer)
 * and paste the hex code below. This will change the liked heart color.
 */
:root {
    --hpb-theme-color: #ff8205; /* Change this hex code to your theme's accent color */
}


/* 1. Container for the photo and heart button */
.hpb-photo-container {
    position: relative;
    display: inline-block; /* Changed for masonry layout */
    width: 100%; /* Ensure it fills the column */
    line-height: 0;
    border-radius: 8px; /* Moved from img to container */
    overflow: hidden; /* This keeps the heart inside the rounded corners */
    margin-bottom: 15px; /* Vertical spacing in the gallery */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Optional: Adds a subtle shadow */
    break-inside: avoid; /* THE FIX: Prevents items from breaking across columns */
}

/* 2. The heart button itself */
.hpb-heart-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hpb-heart-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* 3. The heart icon (Font Awesome) */
.hpb-heart-button i {
    font-size: 20px;
    color: #cccccc;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* 4. The 'liked' state */
.hpb-heart-button i.liked {
    color: var(--hpb-theme-color); /* This now uses your theme's accent color */
    transform: scale(1.1);
}

/* 5. Toast Notification Styles */
.hpb-toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100px);
    background-color: #333; /* Changed to a dark/black color */
    color: #fff; /* Ensure text is white */
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hpb-toast-notification.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 6. Main Gallery Grid (MASONRY LAYOUT) */
.hpb-saved-photos-gallery {
    /* Replaced grid with CSS Columns for a masonry effect */
    column-count: 4; /* Default for desktop */
    column-gap: 15px;
}

/* Responsive adjustments for the masonry grid */
@media (max-width: 1200px) {
    .hpb-saved-photos-gallery {
        column-count: 3;
    }
}
@media (max-width: 900px) {
    .hpb-saved-photos-gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .hpb-saved-photos-gallery {
        column-count: 1;
    }
}


/* 7. Gallery Image Styles */
.hpb-saved-photos-gallery img {
    width: 100%;
    height: auto;
    display: block;
    /* border-radius is now on the container */
}

/* 8. CORRECTED: Force hearts inside the gallery to always be the 'solid' icon and colored */
.hpb-saved-photos-gallery .hpb-heart-button i {
    font-family: "Font Awesome 5 Free"; /* Ensures the correct icon font is used */
    font-weight: 900; /* This is the specific weight for SOLID (filled) icons */
    color: var(--hpb-theme-color);
    transform: scale(1.1);
}
