/**
 * Users List Widget Styles
 * Enhanced with Agent Profile features
 * 
 * @package TM_Catalog
 * @author Templines
 * @link https://templines.com
 */

.tm-users-list {
    width: 100%;
}

.tm-users-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Agent Card Container */
.tm-user-card,
.tm-agent-card {
    background: #fff;
    padding: 0px;
    border-radius: 0;
    position: relative;
    transition: all 0.3s 
ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    overflow: hidden;
}

.tm-user-card:hover {
    transform: translateY(-5px);
}

/* Trusted Member Badge */
.trusted-author {
    position: absolute;
    right: 30px;
    top: 30px;
}


.tm-user-name.tm-agent-name{
    margin-bottom: 10px;
    margin-top: 10px;
}

.trusted-author-content {
    display: inline-flex;
    background: #fff;
    border-radius: 100%;
    padding: 8px;
    border: 1px solid #E8E8E9;
    position: relative;
}

.trusted-author-content img {
    max-width: 25px;
    height: auto;
}

.trusted-author-text {
    padding: 3px 10px;
    color: #2A3946;
    transform: translate3d(-25px, -50%, 0);
    position: absolute;
    right: 100%;
    top: 50%;
    white-space: nowrap;
    background: #fff;
    font-size: 13px;
    transition: 0.3s ease;
    opacity: 0;
    visibility: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.trusted-author-text:before {
    content: '';
    position: absolute;
    transform: translate3d(80%, -50%, 0);
    right: 0;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 6px solid #fff;
    border-right: 0;
}

.trusted-author-content:hover .trusted-author-text {
    opacity: 1;
    visibility: visible;
    transform: translate3d(-10px, -50%, 0);
}

/* Avatar Section - Base Styles */
.tm-user-avatar,
.tm-agent-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.tm-user-avatar a,
.tm-agent-avatar a {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tm-user-avatar a:hover,
.tm-agent-avatar a:hover {
    transform: scale(1.05);
}

.tm-user-avatar img,
.tm-agent-avatar img {
    display: block;
    object-fit: cover;
}

/* Avatar Style: Circle (Default) */
.tm-user-avatar.avatar-circle a,
.tm-agent-avatar.avatar-circle a {
    border-radius: 50%;
}

.tm-user-avatar.avatar-circle img,
.tm-agent-avatar.avatar-circle img {
    border-radius: 50%;
    border: 4px solid #f0f0f0;
    height: 120px;
    width: 120px;
}

/* Avatar Style: Square */
.tm-user-avatar.avatar-square a,
.tm-agent-avatar.avatar-square a {
    border-radius: 0;
}

.tm-user-avatar.avatar-square img,
.tm-agent-avatar.avatar-square img {
    border-radius: 0;
    border: 4px solid #f0f0f0;
}

/* Avatar Style: Rounded Square */
.tm-user-avatar.avatar-rounded a,
.tm-agent-avatar.avatar-rounded a {
    border-radius: 12px;
}

.tm-user-avatar.avatar-rounded img,
.tm-agent-avatar.avatar-rounded img {
    border-radius: 12px;
    border: 4px solid #f0f0f0;
}

/* Avatar Style: Full Width */
.tm-user-avatar.avatar-fullwidth,
.tm-agent-avatar.avatar-fullwidth {
    width: 100%;
    margin-bottom: 20px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    text-align: left;
}

.tm-user-avatar.avatar-fullwidth a,
.tm-agent-avatar.avatar-fullwidth a {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
}

.tm-user-avatar.avatar-fullwidth a:hover,
.tm-agent-avatar.avatar-fullwidth a:hover {
    transform: none;
    opacity: 0.9;
}

.tm-user-avatar.avatar-fullwidth img,
.tm-agent-avatar.avatar-fullwidth img {
    width: 100%;
    height: 200px;
    border-radius: 0;
    border: none;
}

/* Agent Info Section */
.tm-user-content,
.tm-agent-info {
    text-align: center;
    margin-bottom: 25px;
    width: 100%;
    padding: 0 40px 0 40px;
}

.tm-user-name,
.tm-agent-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1e1e1e;
    padding: 0;
    line-height: 1.7;
}

.tm-user-name a,
.tm-agent-name a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tm-user-name a:hover,
.tm-agent-name a:hover {
    color: #135e96;
}

.tm-agent-since {
    color: #757575;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.tm-user-username {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px;
}

.tm-user-bio {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tm-user-bio p {
    margin: 0;
}

.tm-user-properties-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    margin-top: -40px;
    position: relative;
    z-index: 9;
}

.tm-user-properties-count i {
    color: #222;
}

.tm-user-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s 
ease;
    width: 83%;
    text-align: center;
    justify-content: center;
}

.tm-user-button:hover {
    transform: translateX(3px);
}

.tm-user-button i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.tm-user-button:hover i {
    transform: translateX(3px);
}

/* Contact Section */
.tm-agent-contacts {
    margin-bottom: 25px;
    width: 100%;
}

.tm-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    justify-content: center;
}

.tm-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    width: 24px;
    height: 24px;
}

.tm-contact-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.tm-contact-item a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.tm-contact-item a:hover {
    color: #135e96;
}

/* Contact Button (Phone Reveal) */
.tm-contact-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    justify-content: center;
}

.tm-contact-button__inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-contact-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    width: 24px;
    height: 24px;
}

.tm-contact-button__icon svg {
    width: 14px;
    height: 24px;
    display: block;
}

.tm-contact-button__icon--additional {
    cursor: pointer;
    transition: opacity 0.3s;
    opacity: 0.7;
}

.tm-contact-button__icon--additional:hover {
    opacity: 1;
}

.tm-contact-button__icon--additional svg {
    width: 20px;
    height: 20px;
}

.tm-phone-display {
    color: #222;
    font-size: 14px;
}

.tm-phone-masked {
    display: inline;
}

.tm-phone-full {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.tm-phone-full:hover {
    color: #135e96;
}

.tm-contact-button.revealed .tm-phone-masked {
    display: none;
}

.tm-contact-button.revealed .tm-phone-full {
    display: inline !important;
}

/* Social Media & Messengers */
.tm-agent-social,
.tm-agent-messengers {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E8E8E9;
    width: 100%;
}

.tm-social-title,
.tm-messenger-title {
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #1e1e1e;
    line-height: 1.7;
    font-size: 19px;
}

.tm-social-links,
.tm-messenger-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Social Links - Icon Only */
.tm-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    text-decoration: none;
    transition: all 0.3s;
    background: #fff;
    border-radius: 50%;
    padding: 7px;
}

.tm-social-link:hover {
    transform: translateY(-2px);
    background: #e9ecef;
}

.tm-social-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Users List: normalize contact icons (stroke-only, inherit color) */
.tm-users-list .tm-contact-icon { color: #2A3946; }
.tm-users-list .tm-contact-icon:hover { color: #135e96; }
.tm-users-list .tm-contact-icon svg,
.tm-users-list .tm-contact-icon svg * {
    stroke: currentColor !important;
    fill: none !important;
}

/* SVG color normalization: make all inline SVGs inherit from text color */
.tm-contact-icon,
.tm-contact-button__icon,
.tm-social-link,
.tm-messenger-link .tm-messenger-icon {
    color: #2A3946;
}

.tm-social-link:hover,
.tm-messenger-link:hover .tm-messenger-icon,
.tm-contact-button__icon--additional:hover {
    color: #135e96;
}




/* Messenger Links - Icon + Text */
.tm-messenger-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    flex: 1;
    min-width: 200px;
}

.tm-messenger-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tm-messenger-link .tm-messenger-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tm-messenger-link .tm-messenger-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tm-messenger-link .tm-messenger-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tm-messenger-link .tm-messenger-text {
    color: #2a3946;
    font-size: 14px;
    font-weight: 500;
    display: block;
}

/* Button Wrapper */
.tm-user-button-wrapper {
    margin-top: 0;
    padding-top: 25px;
    border-top: 1px solid #E8E8E9;
    width: 100%;
    padding-bottom: 25px;
}

/* Responsive */
@media (max-width: 1024px) {
    .tm-users-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tm-users-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tm-user-card,
    .tm-agent-card {
        padding: 20px;
    }
    
    .tm-user-avatar.avatar-fullwidth,
    .tm-agent-avatar.avatar-fullwidth {
        margin-left: -20px;
        margin-right: -20px;
        margin-top: -20px;
    }
    
    .tm-messenger-link {
        min-width: 100%;
    }
}

/* ========================================
   Carousel Styles
   ======================================== */

.tm-users-carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

.tm-users-carousel-wrapper .swiper-container {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.tm-users-carousel-wrapper .swiper-wrapper {
    display: flex !important;
    align-items: stretch;
    transition-property: transform;
    box-sizing: content-box;
}

.tm-users-carousel-wrapper .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0 !important;
    width: 100%;
    position: relative;
    transition-property: transform;
}

.tm-users-carousel-wrapper .swiper-slide .tm-user-card {
    width: 100%;
    margin-bottom: 0;
}

/* Ensure links and buttons are clickable */
.tm-users-carousel-wrapper a,
.tm-users-carousel-wrapper button {
    cursor: pointer;
    pointer-events: auto;
}

.tm-users-carousel-wrapper .swiper-slide {
    cursor: default;
}

/* Navigation Arrows */
.tm-users-carousel-wrapper .swiper-button-next,
.tm-users-carousel-wrapper .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tm-users-carousel-wrapper .swiper-button-next:after,
.tm-users-carousel-wrapper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
    color: #2a3946;
}

.tm-users-carousel-wrapper .swiper-button-next:hover,
.tm-users-carousel-wrapper .swiper-button-prev:hover {
    background: #2a3946;
    transform: scale(1.1);
}

.tm-users-carousel-wrapper .swiper-button-next:hover:after,
.tm-users-carousel-wrapper .swiper-button-prev:hover:after {
    color: #fff;
}

.tm-users-carousel-wrapper .swiper-button-next {
    right: 0;
}

.tm-users-carousel-wrapper .swiper-button-prev {
    left: 0;
}

/* Pagination */
.tm-users-carousel-wrapper .swiper-pagination {
    position: relative;
    margin-top: 30px;
    bottom: auto;
}

.tm-users-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
}

.tm-users-carousel-wrapper .swiper-pagination-bullet-active {
    background: #2a3946;
    width: 30px;
    border-radius: 5px;
}

/* Responsive Carousel */
@media (max-width: 1024px) {
    .tm-users-carousel-wrapper {
        padding: 0 40px;
    }
    
    .tm-users-carousel-wrapper .swiper-button-next,
    .tm-users-carousel-wrapper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .tm-users-carousel-wrapper .swiper-button-next:after,
    .tm-users-carousel-wrapper .swiper-button-prev:after {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .tm-users-carousel-wrapper {
        padding: 0 35px;
    }
    
    .tm-users-carousel-wrapper .swiper-button-next,
    .tm-users-carousel-wrapper .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .tm-users-carousel-wrapper .swiper-button-next:after,
    .tm-users-carousel-wrapper .swiper-button-prev:after {
        font-size: 12px;
    }
}
