/**
 * Discord Integration Styles
 *
 * @package Team_Exciting
 * @subpackage Discord_Integration
 * @since 1.0.0
 */

/* ==========================================================================
   Discord Widget
   ========================================================================== */

.discord-widget-container {
    max-width: 100%;
    margin: 20px auto;
}

.discord-widget-iframe {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Discord Login Button
   ========================================================================== */

.discord-login-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #5865F2;
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.discord-login-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-login-button svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Discord Profile Card
   ========================================================================== */

.discord-profile-card {
    background: #2C2F33;
    border-radius: 8px;
    padding: 20px;
    color: white;
    max-width: 400px;
}

.discord-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.discord-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #5865F2;
}

.discord-profile-info h3 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 20px;
}

.discord-tag {
    color: #b9bbbe;
    font-size: 14px;
}

.discord-profile-actions {
    margin-top: 15px;
}

.discord-disconnect-button {
    background: #ED4245;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.discord-disconnect-button:hover {
    background: #C03537;
}

.discord-connected-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #43B581;
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

.discord-profile-empty {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ==========================================================================
   Server Stats
   ========================================================================== */

.discord-server-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.discord-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    flex: 1;
    min-width: 150px;
}

.discord-stat-icon {
    font-size: 32px;
}

.discord-stat-content {
    display: flex;
    flex-direction: column;
}

.discord-stat-number {
    font-size: 24px;
    font-weight: normal;
}

.discord-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* ==========================================================================
   Discord Messages
   ========================================================================== */

.discord-messages-container {
    background: #36393F;
    border-radius: 8px;
    padding: 15px;
    color: #DCDDDE;
}

.discord-message-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #2F3136;
}

.discord-message-item:last-child {
    border-bottom: none;
}

.discord-message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.discord-message-content-wrapper {
    flex: 1;
}

.discord-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.discord-message-author {
    font-weight: 600;
    color: white;
}

.discord-message-timestamp {
    font-size: 12px;
    color: #72767D;
}

.discord-message-text {
    color: #DCDDDE;
    line-height: 1.5;
    word-wrap: break-word;
}

.discord-message-text a {
    color: #00B0F4;
    text-decoration: none;
}

.discord-message-text a:hover {
    text-decoration: underline;
}

.discord-mention {
    background: rgba(88, 101, 242, 0.3);
    color: #DEE0FC;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Discord Embeds */
.discord-embed {
    background: #2F3136;
    border-left: 4px solid #5865F2;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 8px;
}

.discord-embed-title {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.discord-embed-title a {
    color: white;
    text-decoration: none;
}

.discord-embed-title a:hover {
    text-decoration: underline;
}

.discord-embed-description {
    color: #DCDDDE;
    line-height: 1.5;
    margin-bottom: 8px;
}

.discord-embed-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.discord-embed-field {
    min-width: 0;
}

.discord-embed-field.inline {
    flex: 1;
    min-width: 150px;
}

.discord-embed-field-name {
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.discord-embed-field-value {
    color: #DCDDDE;
}

.discord-embed-image img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 12px;
}

.discord-embed-thumbnail {
    float: right;
    margin-left: 16px;
}

.discord-embed-thumbnail img {
    max-width: 80px;
    border-radius: 4px;
}

/* Discord Attachments */
.discord-attachments {
    margin-top: 8px;
}

.discord-attachment-image {
    margin-top: 8px;
}

.discord-attachment-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.discord-attachment-file {
    margin-top: 8px;
}

.discord-attachment-file a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #2F3136;
    border-radius: 4px;
    color: #00B0F4;
    text-decoration: none;
}

.discord-attachment-file a:hover {
    background: #40444B;
}

/* Channel Feed */
.discord-channel-feed {
    background: #36393F;
    border-radius: 8px;
    overflow: hidden;
}

.discord-channel-header {
    background: #2F3136;
    padding: 15px 20px;
    border-bottom: 2px solid #5865F2;
}

.discord-channel-name {
    margin: 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.discord-channel-icon {
    color: #72767D;
    font-size: 24px;
}

.discord-messages-list {
    padding: 15px;
}

.discord-no-messages {
    text-align: center;
    padding: 40px 20px;
    color: #72767D;
}

/* ==========================================================================
   Discord Members
   ========================================================================== */

.discord-members-container {
    display: grid;
    gap: 15px;
}

.discord-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.discord-members-list {
    grid-template-columns: 1fr;
}

.discord-member-card {
    background: #2C2F33;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.discord-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.discord-member-avatar {
    position: relative;
}

.discord-member-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.discord-member-badges {
    position: absolute;
    bottom: -4px;
    right: -4px;
    display: flex;
    gap: 2px;
}

.discord-badge {
    font-size: 14px;
    background: #2C2F33;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-member-info {
    flex: 1;
    min-width: 0;
}

.discord-member-name {
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-member-username {
    font-size: 14px;
    color: #b9bbbe;
}

.discord-discriminator {
    color: #72767D;
}

.discord-member-roles {
    margin-top: 5px;
    font-size: 12px;
    color: #b9bbbe;
}

.discord-role-count {
    display: inline-block;
    padding: 2px 8px;
    background: #5865F2;
    border-radius: 10px;
    color: white;
    font-size: 11px;
}

/* Simple Member List */
.discord-member-list-simple {
    list-style: none;
    padding: 0;
    margin: 0;
}

.discord-member-list-simple li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.discord-member-list-simple li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Discord Join Button
   ========================================================================== */

.discord-join-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #5865F2;
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.discord-join-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.5);
}

.discord-join-button svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.discord-error-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FEE;
    border-left: 4px solid #ED4245;
    border-radius: 4px;
    color: #C03537;
    font-weight: 600;
}

.discord-error-icon {
    font-size: 20px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .discord-server-stats {
        flex-direction: column;
    }

    .discord-members-grid {
        grid-template-columns: 1fr;
    }

    .discord-message-item {
        flex-direction: column;
        gap: 10px;
    }

    .discord-embed-thumbnail {
        float: none;
        margin: 12px 0 0 0;
    }

    .discord-login-button,
    .discord-join-button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .discord-profile-empty {
        background: #2C2F33;
        color: white;
    }

    .discord-member-list-simple li {
        border-bottom-color: #40444B;
        color: #DCDDDE;
    }
}
