/* Social Media Display Frontend Styles */

.smd-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: var(--smd-bg-color, #ffffff);
    color: var(--smd-text-color, #333333);
    border-radius: var(--smd-border-radius, 8px);
    overflow: hidden;
    margin: 20px 0;
}

/* Grid Layout */
.smd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.smd-container[data-spacing="compact"] .smd-grid {
    gap: 15px;
    padding: 15px;
}

.smd-container[data-spacing="spacious"] .smd-grid {
    gap: 30px;
    padding: 30px;
}

/* List Layout */
.smd-list {
    padding: 20px;
}

.smd-account-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

.smd-account-list-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.smd-account-list-item:last-child {
    border-bottom: none;
}

.smd-account-list-item .smd-platform-icon {
    flex-shrink: 0;
    margin-right: 15px;
}

.smd-account-list-item .smd-account-details {
    flex-grow: 1;
}

.smd-account-list-item .smd-name-section {
    margin-bottom: 5px;
}

.smd-account-list-item .smd-display-name {
    font-weight: 600;
    margin-right: 10px;
}

.smd-account-list-item .smd-username {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.9em;
}

.smd-account-list-item .smd-follower-count {
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.7);
}

.smd-account-list-item .smd-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Card Layout */
.smd-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    padding: 25px;
}

.smd-account-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--smd-border-radius, 8px);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.smd-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.smd-enhanced-card {
    background: linear-gradient(135deg, var(--smd-bg-color, #ffffff) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid var(--smd-accent-color, #007cba);
}

/* Platform Icons */
.smd-platform-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--smd-accent-color, #007cba);
    color: white;
}

.smd-account-list-item .smd-platform-icon {
    width: 40px;
    height: 40px;
    margin: 0;
}

.smd-platform-icon svg {
    width: 24px;
    height: 24px;
}

.smd-account-list-item .smd-platform-icon svg {
    width: 20px;
    height: 20px;
}

/* Platform-specific colors */
.smd-account-card[data-platform="instagram"] .smd-platform-icon {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.smd-account-card[data-platform="twitter"] .smd-platform-icon {
    background-color: #1da1f2;
}

.smd-account-card[data-platform="facebook"] .smd-platform-icon {
    background-color: #1877f2;
}

.smd-account-card[data-platform="youtube"] .smd-platform-icon {
    background-color: #ff0000;
}

.smd-account-card[data-platform="tiktok"] .smd-platform-icon {
    background-color: #000000;
}

.smd-account-card[data-platform="linkedin"] .smd-platform-icon {
    background-color: #0077b5;
}

/* Account Information */
.smd-account-info {
    margin-bottom: 20px;
}

.smd-display-name {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--smd-text-color, #333333);
}

.smd-username {
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.6);
    margin: 0 0 15px 0;
}

.smd-follower-count {
    margin: 15px 0;
}

.smd-count {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--smd-accent-color, #007cba);
    display: block;
}

.smd-label {
    font-size: 0.85em;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* QR Codes */
.smd-qr-code {
    margin: 20px 0;
}

.smd-qr-code img {
    border-radius: 8px;
    border: 2px solid var(--smd-accent-color, #007cba);
}

.smd-qr-code small {
    display: block;
    margin-top: 8px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.8em;
}

.smd-qr-code-small img {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Follow Buttons */
.smd-follow-button {
    margin-top: 20px;
}

.smd-follow-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--smd-accent-color, #007cba);
    color: white !important;
    text-decoration: none;
    border-radius: var(--smd-border-radius, 8px);
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
}

.smd-follow-link:hover {
    background-color: rgba(0, 124, 186, 0.8);
    transform: translateY(-1px);
    text-decoration: none;
    color: white !important;
}

.smd-account-list-item .smd-follow-link {
    padding: 8px 16px;
    font-size: 0.8em;
}

/* Last Updated */
.smd-last-updated {
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.02);
}

.smd-last-updated small {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.8em;
}

/* No Accounts Message */
.smd-no-accounts {
    text-align: center;
    padding: 40px 20px;
    color: rgba(0, 0, 0, 0.6);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smd-grid,
    .smd-cards {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    
    .smd-account-list-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .smd-account-list-item .smd-platform-icon {
        margin: 0 auto;
    }
    
    .smd-account-list-item .smd-actions {
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .smd-container {
        --smd-bg-color: #1a1a1a;
        --smd-text-color: #ffffff;
    }
    
    .smd-account-card {
        background: #2a2a2a;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .smd-account-list-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .smd-last-updated {
        background-color: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
}