/**
 * Photo Credit Overlay Styles
 * Used for displaying photo credits on committee, subregion, and blog post images
 */

/* Base wrapper styles for image types that show credits */
.committee-image-wrapper,
.subregion-image-wrapper,
.blog-featured-image-wrapper,
.landing-hero__image-wrapper,
.image-content__image-wrapper,
.article-featured-image-wrapper,
.transfer-featured-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
}

/* Photo credit overlay - positioned at bottom-right corner */
.photo-credit-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 2px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    display: grid;
}

/* Credit text styling */
.photo-credit-text {
    color: #ffffff;
    font-size: 11px;
    font-style: normal;
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: 0.2px;
    display: inline-block;
    white-space: nowrap;
}

/* Make images block-level to remove bottom gap */
.committee-image-wrapper img,
.subregion-image-wrapper img,
.blog-featured-image-wrapper img,
.landing-hero__image-wrapper img,
.image-content__image-wrapper img,
.card__image-wrapper img,
.article-featured-image-wrapper img,
.transfer-featured-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Card-specific photo credit styles */
.card__image-wrapper {
    position: relative;
    overflow: hidden;
}

.card__photo-credit {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 6px;
    border-radius: 2px;
    z-index: 10;
    display: grid;
}

/* Smaller text for card photo credits */
.photo-credit-text--small {
    color: #ffffff;
    font-size: 9px;
    font-style: normal;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0.1px;
    display: inline-block;
    white-space: nowrap;
}

/* Landing hero image specific styles */
.landing-hero__image {
    position: relative;
}

.landing-hero__image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.landing-hero__image-wrapper .photo-credit-overlay {
    bottom: 16px;
    right: 16px;
    padding: 6px 12px;
    z-index: 20;
    display: grid;
}

/* Image + content component specific styles */
.image-content__image-wrapper {
    position: relative;
}

/* Archive/grid view - smaller credit text */
.archive-view .photo-credit-overlay,
.grid-view .photo-credit-overlay {
    padding: 6px 8px;
}

.archive-view .photo-credit-text,
.grid-view .photo-credit-text {
    font-size: 10px;
}

/* Hero section specific styles - slightly larger text */
.hero-section .photo-credit-overlay {
    bottom: 15px;
    right: 15px;
    padding: 8px 12px;
}

.hero-section .photo-credit-text {
    font-size: 12px;
}

/* Hover state - subtle enhancement */
.committee-image-wrapper:hover .photo-credit-overlay,
.subregion-image-wrapper:hover .photo-credit-overlay,
.blog-featured-image-wrapper:hover .photo-credit-overlay,
.article-featured-image-wrapper:hover .photo-credit-overlay,
.transfer-featured-image-wrapper:hover .photo-credit-overlay {
    background: rgba(0, 0, 0, 0.85);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .photo-credit-overlay {
        bottom: 8px;
        right: 8px;
        padding: 4px 8px;
    }
    
    .photo-credit-text {
        font-size: 10px;
    }
    
    /* Card photo credits on mobile */
    .card__photo-credit {
        bottom: 4px;
        right: 4px;
        padding: 2px 4px;
    }
    
    .photo-credit-text--small {
        font-size: 8px;
    }
    
    /* Landing hero on mobile */
    .landing-hero__image-wrapper .photo-credit-overlay {
        bottom: 10px;
        right: 10px;
        padding: 4px 8px;
    }
}

/* Print styles - hide photo credits */
@media print {
    .photo-credit-overlay {
        display: none;
    }
}