/**
 * DM ACF Speaker Plugin Styles
 */

/* Container for all speaker cards */
.dm-speakers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 24rem));
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

/* Link wrapper for the entire card */
.dm-speaker-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 18rem;
    max-width: 24rem;
}

.dm-speaker-card-link:hover,
.dm-speaker-card-link:focus {
    text-decoration: none;
    color: inherit;
}

/* Individual speaker card */
.dm-speaker-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 120px;
    cursor: pointer;
}

.dm-speaker-card-link:hover .dm-speaker-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Portrait image section - square on the left */
.dm-speaker-portrait {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
}

.dm-speaker-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 2;
    /* Make speaker images slightly transparent to show background */
    opacity: 1;
}

/* Placeholder for missing image */
.dm-speaker-placeholder {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Speaker information section - on the right */
.dm-speaker-info {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Name section */
.dm-speaker-name-section {
    margin-bottom: 0.5rem;
}

/* Speaker name */
.dm-speaker-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a202c;
    word-wrap: break-word;
}

.dm-speaker-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: #4a5568;
}

/* Company section */
.dm-speaker-company-section {
    margin-top: auto;
}

/* Company information */
.dm-speaker-company {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    line-height: 1.2;
    word-wrap: break-word;
}

/* Arrow indicator on the right */
.dm-speaker-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    color: #9ca3af;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.dm-speaker-card-link:hover .dm-speaker-arrow {
    color: #4f46e5;
    transform: translateX(2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .dm-speakers-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
        padding: 0 1rem;
    }
    
    .dm-speaker-card-link {
        min-width: unset;
        max-width: unset;
    }
    
    .dm-speaker-card {
        height: 100px;
    }
    
    .dm-speaker-portrait {
        width: 100px;
        height: 100px;
    }
    
    .dm-speaker-info {
        padding: 0.75rem 1rem;
    }
    
    .dm-speaker-name {
        font-size: 1rem;
    }
    
    .dm-speaker-company {
        font-size: 0.85rem;
    }
    
    .dm-speaker-arrow {
        width: 28px;
    }
}

@media (max-width: 480px) {
    .dm-speaker-card {
        height: 90px;
    }
    
    .dm-speaker-portrait {
        width: 90px;
        height: 90px;
    }
    
    .dm-speaker-info {
        padding: 0.5rem 0.75rem;
    }
    
    .dm-speaker-name {
        font-size: 0.95rem;
    }
    
    .dm-speaker-company {
        font-size: 0.8rem;
    }
    
    .dm-speaker-name-section {
        margin-bottom: 0.25rem;
    }
    
    .dm-speaker-arrow {
        width: 24px;
    }
}

/* Custom modifier classes */
.dm-speakers-container.compact {
    gap: 1rem;
}

.dm-speakers-container.compact .dm-speaker-card {
    height: 100px;
}

.dm-speakers-container.compact .dm-speaker-portrait {
    width: 100px;
    height: 100px;
}

.dm-speakers-container.large {
    grid-template-columns: repeat(auto-fit, minmax(20rem, 26rem));
    gap: 2rem;
}

.dm-speakers-container.large .dm-speaker-card {
    height: 140px;
}

.dm-speakers-container.large .dm-speaker-portrait {
    width: 140px;
    height: 140px;
}