/**
 * Partners and Speakers Shortcode Styles
 * Uses shared components to reduce redundancy
 */

/* Import shared components */
@import url('wdm-shared-components.css');

/* Specific overrides for partners/speakers */
.wdm-partners-speakers-wrap {
    /* Inherits from .wdm-shared-wrap */
}

.wdm-partners-speakers {
    /* Inherits from .wdm-shared-container */
}

.wdm-partners-speakers-data {
    /* Inherits from .wdm-shared-data */
}

.wdm-partners-speakers-controls {
    /* Inherits from .wdm-shared-controls */
}

.wdm-partners-speakers-grid {
    /* Inherits from .wdm-shared-grid */
}

.wdm-partner-speaker-card {
    /* Inherits from .wdm-shared-card */
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid #e1e4e5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px; /* Add margin between cards */
}

.wdm-partner-speaker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ast-global-color-8), #171955);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.wdm-partner-speaker-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--ast-global-color-8);
}

.wdm-partner-speaker-card:hover::before {
    transform: scaleX(1);
}

/* Enhanced card layout - New Structure */
.wdm-card-upper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0px;
}

.wdm-card-upper-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0; /* Allow flex item to shrink */
}

.wdm-card-upper-right {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0; /* Prevent right column from shrinking */
}

.wdm-card-lower {
    border-top: 1px solid #e1e4e5;
    padding-top: 15px;
}

/* Legacy support removed - using new card structure */

/* Image styling with proper aspect ratio preservation */
.wdm-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e1e4e5;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent image container from shrinking */
}

/* Speaker-specific image styling - circular */
.wdm-speaker-image {
    border-radius: 50% !important; /* Make speaker images circular */
    width: 100px;
    height: 100px;
    border: 2px solid #e1e4e5;
    overflow: hidden;
}

/* Speaker images should use cover for better circular appearance */
.wdm-speaker-image .wdm-partner-speaker-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.wdm-image:hover {
    border-color: var(--ast-global-color-8, #0073aa);
    transform: scale(1.05);
}

.wdm-partner-speaker-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to prevent cropping */
    object-position: center;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.wdm-partner-speaker-image:hover {
    transform: scale(1.1);
}

/* Enhanced title styling */
.wdm-partner-speaker-card .wdm-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Speaker-specific title and affiliation styling */
.wdm-speaker-title {
    font-size: 16px;
    color: #666666;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.wdm-speaker-affiliation {
    font-size: 14px;
    color: #666666;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* Abbreviation styling - greyish color */
.wdm-abbreviation-text {
    color: #666666;
    font-weight: 400;
}

/* Enhanced field styling */
.wdm-abbreviation,
.wdm-association {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--ast-global-color-8, #0073aa);
}

.wdm-abbreviation-label,
.wdm-association-label {
    font-weight: 600;
    color: var(--ast-global-color-8, #0073aa);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced website styling - simplified */
.wdm-website {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wdm-website:hover {
    /* No background or border changes on hover */
}

.wdm-website .dashicons {
    color:  #666;
    font-size: 16px;
}

.wdm-website a {
    color:  #666;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.wdm-website a:hover {
    text-decoration: underline;
    color:  #666;
}

/* Enhanced linked projects styling - simplified */
.wdm-linked-projects {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

h6.wdm-projects-label {
    font-size: 15px;
    margin-bottom: 0;
    color: #000;
}

.wdm-project-link {
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wdm-project-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* Enhanced date styling */
.wdm-date-created {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.wdm-date-created .dashicons {
    color: var(--ast-global-color-8, #0073aa);
    font-size: 14px;
}

/* Enhanced controls styling */
.wdm-partners-speakers-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    border-radius: 10px;
    padding: 10px 20px;
    box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced search box styling */
.wdm-search-box {
    transition: all 0.3s ease;
}

/* Dual search fields for speakers */
.wdm-speaker-search {
    display: flex;
    gap: 15px;
    align-items: center;
}

.wdm-search-field {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    min-width: 200px;
}

.wdm-search-field:hover {
    border-color: var(--ast-global-color-8, #0073aa);
}

.wdm-search-field:focus-within {
    border-color: var(--ast-global-color-8, #0073aa);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.wdm-search-field .dashicons {
    color: #666;
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.wdm-search-field .wdm-search-input {
    border: none !important;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    width: 100%;
    padding: 0;
}

.wdm-search-field .wdm-search-input::placeholder {
    color: #999;
}

/* Enhanced download buttons - using original color */
.wdm-download-btn {
    padding: 8px 16px;
    background-color: #171955;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.wdm-download-btn:hover {
    background-color: #0f1238;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wdm-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wdm-download-btn:focus {
    outline: none;
    background-color: #171955;
    color: white;
}

.wdm-download-btn .dashicons {
    font-size: 14px;
    opacity: 0.8;
    width: 10px;
    height: 15px;
}

/* Enhanced pagination styling */
.wdm-total-entries {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e1e4e5;
    font-size: 14px;
    color: #666;
}

.wdm-entries-info {
    font-weight: 500;
}

.wdm-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

.wdm-pagination button {
    padding: 12px;
    border: 1px solid #d4d4d4;
    background: none;
    color: #666;
    cursor: pointer;
    border-radius: 100%;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wdm-pagination button:hover:not(:disabled) {
    background-color: var(--ast-global-color-8);
    color: white;
    border-color: var(--ast-global-color-8);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-pagination button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wdm-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wdm-pagination button.current-page {
    background-color: var(--ast-global-color-8);
    color: white;
    border: 1px solid var(--ast-global-color-8);
    font-weight: 600;
    cursor: default;
    pointer-events: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Loading State */
.wdm-partners-speakers-grid.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.wdm-partners-speakers-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ast-global-color-8, #0073aa);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animation */
.wdm-partner-speaker-card {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wdm-partner-speaker-card {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 15px;
        padding: 15px;
    }

    .wdm-website {
        justify-content: center;
    }
    
    .wdm-card-upper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .wdm-card-upper-left {
        text-align: center;
    }
    
    .wdm-card-lower {
        border-top: 1px solid #e1e4e5;
        padding-top: 15px;
    }
    
    .wdm-image {
        width: 80px;
        height: 80px;
    }
    
    .wdm-speaker-image {
        width: 80px;
        height: 80px;
    }
    
    .wdm-partner-speaker-card .wdm-card-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wdm-card-upper {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .wdm-card-upper-left {
        text-align: center;
    }
    
    .wdm-image {
        width: 60px;
        height: 60px;
    }
    
    .wdm-speaker-image {
        width: 60px;
        height: 60px;
    }
    
    .wdm-partner-speaker-card .wdm-card-title {
        font-size: 16px;
    }
}

/* Responsive design for dual search fields */
@media (max-width: 768px) {
    .wdm-speaker-search {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .wdm-search-field {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .wdm-speaker-search {
        flex-direction: column;
        gap: 8px;
    }
    
    .wdm-search-field {
        width: 100%;
    }
}
