/* ---------------------------------------------
   ProfileSearch Plugin Styles (Updated)
--------------------------------------------- */

/* Container */
.profileslist-container {
    max-width: 90%;
    margin: 40px auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* Grid Layout */
.profileslist-list-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Profile Card */
.profileslist-container .profileslist-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    margin-bottom: 0;
    padding: 2vw;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    z-index: 2;
    background: #F7FAFC;
    border: 1px solid #CBD5E0;
    border-radius: 10px;
    cursor: pointer;
}

/* Hover Effect */
body .profileslist-container .profileslist-item:hover,
body .profileslist-container .profileslist-item.profileslist-hover {
    transform: scale(1.03) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Thumbnail */
.profileslist-image {
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.profileslist-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 200px;
    transition: transform 0.4s ease !important;
}

.profileslist-image:hover img {
    transform: scale(1.05) !important;
}

.profileslist-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease !important;
}

.profileslist-image:hover::after {
    opacity: 1 !important;
}

/* Content */
.profileslist-content {
    width: 100%;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.profileslist-title {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
    font-size: clamp(1.2rem, 2vw, 1.35rem);
    margin: 0 0 10px;
    font-weight: 600;
}

.profileslist-desc {
    font-family: var(--e-global-typography-text-font-family), Sans-serif !important;
    font-size: clamp(1rem, 2vw, 1rem);
    line-height: 1.5;
    margin: 0 0 15px;
    color: #ffffff;
}

/* Button pinned to bottom */
.profileslist-more-details {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 500;
    line-height: 1.5;
    min-height: 44px;
    min-width: 120px;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
    background: #1DA1F2;
    color: #FFFFFF;
    margin-top: auto; /* Pins to bottom inside flex container */
}

/* Button Hover */
.profileslist-more-details:hover {
    background: #63B3ED !important;
    transform: scale(1.05) !important;
}

/* Modal Backdrop */
#profileslist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    overflow-y: auto;
}

#profileslist-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal Box */
.profileslist-modal-content {
    background: #FFFFFF;
    margin: auto;
    padding: 2vw;
    max-width: 80vw;
    width: 90%;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

#profileslist-modal.active .profileslist-modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Scrollbars */
.profileslist-modal-content::-webkit-scrollbar {
    width: 8px;
}
.profileslist-modal-content::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 4px;
}
.profileslist-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.profileslist-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal Header */
.profileslist-modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 15px;
}

/* Modal Image */
.profileslist-modal-image {
    flex: 0 0 10vw;
    margin-right: 1vw;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.profileslist-modal-image img {
    width: 100%;
    height: 10vw;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    transition: transform 0.4s ease;
}
.profileslist-modal-image:hover img {
    transform: scale(1.05);
}
.profileslist-modal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.profileslist-modal-image:hover::after {
    opacity: 1;
}

/* Modal Title */
.profileslist-modal-title {
    font-family: inherit;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: #1A202C;
    margin: 0;
    flex: 1;
    font-weight: 700;
}

/* Modal Tabs */
.profileslist-tabs {
    display: flex;
    border-bottom: 2px solid #E2E8F0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.profileslist-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 500;
    color: #4A5568;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}
.profileslist-tab:hover {
    color: #1DA1F2;
}
.profileslist-tab.active {
    color: #1DA1F2;
    border-bottom: 2px solid #1DA1F2;
}
.profileslist-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.profileslist-tab-content.active {
    display: flex;
    opacity: 1;
}

/* Modal Body */
.profileslist-modal-body {
    font-family: inherit;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 20px;
}
.profileslist-modal-status {
    font-family: inherit;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #718096;
    margin-bottom: 15px;
    font-style: italic;
}

/* Modal Close */
.profileslist-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #4A5568;
    transition: color 0.3s ease;
}
.profileslist-modal-close:hover {
    color: #E53E3E;
}

/***********************/
/* Hide modals by default */
#profileslist-modal,
#profileslist-modal-full {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

/* Show modals only when 'active' */
#profileslist-modal.active,
#profileslist-modal-full.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal content styling */
.profileslist-modal-content,
.profileslist-modal-full-container {
    background: #fff;
    padding: 2rem;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    overflow-y: auto;
    position: relative;
}

/* Thumbnail container styling */
.profileslist-modal-thumbnail {
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.profileslist-modal-thumbnail img {
    max-width: 120px;
    height: auto;
    display: block;
}

/* Thumbnail hover effect */
.profileslist-modal-thumbnail:hover {
    border-color: #0073aa;
}
