/**
 * Charter of Trust Friends Logos Shortcode Styles
 * Designed to match PDF page 4 layout
 */

/* Main Container */
.charter-friends-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section */
.charter-friends-header {
    text-align: center;
    margin-bottom: 3rem;
}

.charter-friends-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.charter-friends-subtitle {
    font-size: 1.125rem;
    color: #4a5568;
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Friends Grid - Responsive Grid Layout */
.charter-friends-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 5), 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-bottom: 2rem;
}

/* Individual Friend Item */
/*.charter-friend-item {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    align-items: center;*/
/*    text-align: center;*/
/*    transition: all 0.3s ease;*/
/*    padding: 1rem;*/
/*    border-radius: 12px;*/
/*    min-height: 140px;*/
/*    justify-content: center;*/
/*    position: relative;*/
/*    background: white;*/
/*    border: 1px solid #e2e8f0;*/
/*    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);*/
/*}*/

/*.charter-friend-item:hover {*/
/*    transform: translateY(-4px);*/
/*    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);*/
/*    border-color: #0066cc;*/
/*}*/

/* Logo Container */
.charter-friend-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    transition: all 0.3s ease;
    position: relative;
}

.charter-friend-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.charter-friend-item:hover .charter-friend-logo img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Logo Placeholder */
.charter-friend-logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 2rem;
    border-radius: 8px;
}

/* Company Name */
.charter-friend-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
    margin: 0;
    max-width: 100%;
    word-break: break-word;
    hyphens: auto;
}

/* Clickable Links */
.charter-friend-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.charter-friend-link:hover {
    text-decoration: none;
    color: inherit;
}

.charter-friend-link:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 12px;
}

/* Loading State */
.charter-friends-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.charter-friends-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: charter-friends-spin 1s linear infinite;
}

@keyframes charter-friends-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.charter-friends-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.charter-friends-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.charter-friends-empty-state h3 {
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* Error State */
.charter-friends-error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.charter-friends-error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.charter-friends-error-state h3 {
    color: #e53e3e;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.charter-friends-retry-btn {
    background: #0066cc;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.charter-friends-retry-btn:hover {
    background: #0052a3;
}

/* Tooltip for company names (optional) */
.charter-friend-item[data-tooltip] {
    position: relative;
}

.charter-friend-item[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    margin-bottom: 0.5rem;
}

.charter-friend-item[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a202c;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    margin-bottom: -5px;
}

.charter-friend-item[data-tooltip]:hover:before,
.charter-friend-item[data-tooltip]:hover:after {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .charter-friends-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .charter-friends-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .charter-friends-container {
        padding: 2rem 1rem;
    }
    
    .charter-friends-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .charter-friend-item {
        padding: 0.75rem;
        min-height: 120px;
    }
    
    .charter-friend-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    .charter-friend-name {
        font-size: 0.75rem;
    }
    
    .charter-friends-title {
        font-size: 1.75rem;
    }
    
    .charter-friends-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .charter-friends-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .charter-friend-item {
        padding: 0.5rem;
        min-height: 100px;
    }
    
    .charter-friend-logo {
        width: 50px;
        height: 50px;
    }
    
    .charter-friend-name {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .charter-friends-title {
        font-size: 1.5rem;
    }
}

/* Alternative Layouts */

/* Compact Layout */
.charter-friends-container.compact .charter-friends-grid {
    gap: 1rem;
}

.charter-friends-container.compact .charter-friend-item {
    padding: 0.5rem;
    min-height: 100px;
}

.charter-friends-container.compact .charter-friend-logo {
    width: 60px;
    height: 60px;
}

.charter-friends-container.compact .charter-friend-name {
    font-size: 0.75rem;
}

/* Minimal Layout (logos only) */
.charter-friends-container.minimal .charter-friend-name {
    display: none;
}

.charter-friends-container.minimal .charter-friend-item {
    min-height: auto;
    padding: 0.75rem;
}

/* Large Layout */
.charter-friends-container.large .charter-friend-logo {
    width: 100px;
    height: 100px;
}

.charter-friends-container.large .charter-friend-item {
    min-height: 160px;
    padding: 1.5rem;
}

.charter-friends-container.large .charter-friend-name {
    font-size: 1rem;
}

/* Masonry Layout Alternative */
.charter-friends-container.masonry .charter-friends-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.charter-friends-container.masonry .charter-friend-item {
    flex: 0 0 auto;
    margin: 0.5rem;
}

/* Dark Theme */
.charter-friends-container.dark {
    color: #e2e8f0;
}

.charter-friends-container.dark .charter-friends-title {
    color: #f7fafc;
}

.charter-friends-container.dark .charter-friends-subtitle {
    color: #cbd5e0;
}

.charter-friends-container.dark .charter-friend-item {
    background: #2d3748;
    border-color: #4a5568;
}

.charter-friends-container.dark .charter-friend-item:hover {
    border-color: #63b3ed;
}

.charter-friends-container.dark .charter-friend-logo {
    background: #1a202c;
}

.charter-friends-container.dark .charter-friend-name {
    color: #e2e8f0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .charter-friend-item {
        border: 2px solid #000;
    }
    
    .charter-friend-item:hover {
        border-color: #0066cc;
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .charter-friend-item,
    .charter-friend-logo img,
    .charter-friends-spinner {
        transition: none;
        animation: none;
    }
    
    .charter-friend-item:hover {
        transform: none;
    }
    
    .charter-friend-item:hover .charter-friend-logo img {
        transform: none;
    }
}

/* Print styles */
@media print {
    .charter-friends-container {
        padding: 1rem 0;
    }
    
    .charter-friend-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .charter-friend-item:hover {
        transform: none;
        box-shadow: none;
    }
}
