/* Styles pour la messagerie audio BuddyPress */
:root {
    --bp-primary: #21759b;
    --bp-primary-dark: #1a5a7a;
    --bp-light-bg: #f5f7fa;
    --bp-dark-bg: #2c3e50;
    --bp-border: #e0e0e0;
    --bp-text: #333333;
    --bp-text-light: #777777;
    --bp-my-msg: #e1f5fe;
    --bp-their-msg: #ffffff;
    --bp-online: #4CAF50;
    --bp-offline: #bbbbbb;
}

.bp-messaging-container {
    display: flex;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 600px;
}

.bp-messaging-sidebar {
    width: 300px;
    background: var(--bp-dark-bg);
    color: white;
    display: flex;
    flex-direction: column;
}

.bp-messaging-sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bp-user-profile {
    display: flex;
    align-items: center;
}

.bp-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid var(--bp-primary);
}

.bp-user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.bp-user-info p {
    font-size: 12px;
    opacity: 0.8;
}

.bp-search-box {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
}

.bp-search-input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bp-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.bp-members-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.bp-member {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.bp-member:hover {
    background: rgba(0, 0, 0, 0.1);
}

.bp-member.active {
    background: var(--bp-primary);
}

.bp-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.bp-member-info {
    flex: 1;
}

.bp-member-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}

.bp-member-status {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.bp-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.bp-status-online {
    background-color: var(--bp-online);
}

.bp-status-offline {
    background-color: var(--bp-offline);
}

.bp-unread-count {
    background-color: var(--bp-primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.bp-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bp-chat-header {
    padding: 16px 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bp-border);
}

.bp-chat-title {
    display: flex;
    align-items: center;
}

.bp-current-member-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.bp-current-member-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.bp-current-member-info p {
    font-size: 13px;
    color: var(--bp-text-light);
    display: flex;
    align-items: center;
}

.bp-chat-actions {
    display: flex;
    gap: 15px;
}

.bp-action-btn {
    background: none;
    border: none;
    color: var(--bp-text-light);
    cursor: pointer;
    font-size: 16px;
}

.bp-action-btn:hover {
    color: var(--bp-primary);
}

.bp-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bp-light-bg);
}

.bp-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.bp-message.my-message {
    align-items: flex-end;
    align-self: flex-end;
    margin-left: auto;
}

.bp-message.their-message {
    align-items: flex-start;
    align-self: flex-start;
}

.bp-message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 5px;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.bp-my-message .bp-message-bubble {
    background: var(--bp-my-msg);
    border-bottom-right-radius: 5px;
}

.bp-their-message .bp-message-bubble {
    background: var(--bp-their-msg);
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.bp-message-time {
    font-size: 11px;
    color: var(--bp-text-light);
    margin: 0 5px;
}

.bp-audio-message {
    display: flex;
    align-items: center;
    padding: 10px;
}

.bp-audio-player {
    width: 250px;
    height: 40px;
}

.bp-attachment-message {
    padding: 10px;
}

.bp-attachment-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--bp-border);
}

.bp-attachment-icon {
    margin-right: 10px;
    color: var(--bp-primary);
    font-size: 20px;
}

.bp-attachment-info {
    flex: 1;
}

.bp-attachment-name {
    font-weight: 500;
    margin-bottom: 3px;
    font-size: 14px;
}

.bp-attachment-size {
    font-size: 12px;
    color: var(--bp-text-light);
}

.bp-download-btn {
    color: var(--bp-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.bp-message-input-container {
    padding: 15px;
    background: white;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--bp-border);
}

.bp-attachment-options {
    display: flex;
    gap: 10px;
    margin-right: 10px;
}

.bp-option-btn {
    background: none;
    border: none;
    color: var(--bp-text-light);
    cursor: pointer;
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-option-btn:hover {
    background: var(--bp-light-bg);
    color: var(--bp-primary);
}

.bp-message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--bp-border);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
}

.bp-message-input:focus {
    border-color: var(--bp-primary);
}

.bp-send-btn {
    background: var(--bp-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.2s;
}

.bp-send-btn:hover {
    background: var(--bp-primary-dark);
}

.bp-typing-indicator {
    font-size: 12px;
    color: var(--bp-text-light);
    padding: 0 20px;
    height: 18px;
    font-style: italic;
}

.bp-audio-recorder {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    width: 280px;
}

.bp-audio-recorder.visible {
    display: flex;
}

.bp-recording-timer {
    margin: 15px 0;
    font-weight: bold;
    font-size: 18px;
}

.bp-recording-controls {
    display: flex;
    gap: 10px;
    width: 100%;
}

.bp-recording-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

.bp-send-audio-btn {
    background: var(--bp-primary);
    color: white;
}

.bp-send-audio-btn:hover {
    background: var(--bp-primary-dark);
}

.bp-cancel-audio-btn {
    background: #f1f1f1;
    color: #333;
}

.bp-cancel-audio-btn:hover {
    background: #e5e5e5;
}

/* Responsive */
@media (max-width: 768px) {
    .bp-messaging-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .bp-messaging-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .bp-chat-messages {
        height: 40vh;
    }
    
    .bp-message {
        max-width: 90%;
    }
}