/* Complaint Popup Container */
.complaint-popup-container {
    position: fixed;
    top: 140px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 280px;
    max-width: calc(100% - 40px);
    pointer-events: none; /* Allows clicking through the container spacing */
}

/* Individual Popup Item Card */
.complaint-popup-item {
    position: relative;
    width: 280px;
    aspect-ratio: 1716 / 560; /* Exact aspect ratio of the opaque card */
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: auto; /* Restores click functionality for card content */
}

.complaint-popup-item:hover {
    transform: translateY(-3px);
}

.complaint-popup-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden; /* Clips the transparent margins of the PNG */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.complaint-popup-item img {
    position: absolute;
    width: 103.38%; /* Scaled to stretch and clip transparent sides (1774/1716) */
    height: auto;
    left: -1.63%; /* Offset to center the opaque card (-28/1716) */
    top: -29.1%; /* Offset to center the opaque card vertically (-163.5/560) */
    display: block;
}

/* Close Button styling matching the theme's blue accent */
.complaint-popup-close {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #0b327b; /* Dark blue from PACC logo/crest */
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    z-index: 10;
}

.complaint-popup-close:hover {
    background-color: #0594ff; /* Accent theme blue */
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 10px rgba(5, 148, 255, 0.4);
}

/* Screen Adaptability */
@media (max-width: 768px) {
    .complaint-popup-container {
        top: 100px;
        width: 210px;
        right: 15px;
        gap: 10px;
    }
    
    .complaint-popup-item {
        width: 210px;
    }
    
    .complaint-popup-close {
        right: -8px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}
