/**
 * Styles pour l'interface de gestion des channel managers
 */

/* Container principal */
.awayout-channel-manager-container {
    font-family: 'Nunito', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête */
.awayout-channel-manager-header {
    margin-bottom: 30px;
}

.awayout-channel-manager-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.awayout-channel-manager-note {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-left: 4px solid #0073e6;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.awayout-channel-manager-note i {
    color: #0073e6;
    margin-right: 10px;
    font-size: 18px;
}

/* Grille des cartes */
.awayout-channel-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Carte de channel manager */
.awayout-channel-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.awayout-channel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* En-tête de la carte */
.awayout-channel-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.awayout-channel-logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.awayout-channel-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.awayout-channel-name {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
}

.awayout-channel-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #666;
}

.awayout-channel-status.connected {
    background-color: #e6f7e6;
    color: #28a745;
}

/* Description */
.awayout-channel-description {
    padding: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    min-height: 60px;
}

/* Actions */
.awayout-channel-actions {
    padding: 0 20px 20px;
}

.awayout-channel-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    font-size: 14px;
}

.awayout-channel-button:hover {
    background-color: #555;
}

.awayout-channel-button.connect {
    background-color: #222;
}

.awayout-channel-button.connect:hover {
    background-color: #222;
}

.awayout-channel-button.disconnect {
    background-color: #F97C5A;
}

.awayout-channel-button.disconnect:hover {
    background-color: #F97C5A;
}

.awayout-channel-button[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Détails de connexion */
.awayout-channel-details {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 13px;
}

.awayout-channel-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.awayout-channel-detail:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* Modal de connexion */
.awayout-channel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.awayout-channel-modal.active {
    display: flex;
}

.awayout-channel-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.awayout-channel-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.awayout-channel-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.awayout-channel-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.awayout-channel-modal-close:hover {
    color: #333;
}

.awayout-channel-modal-body {
    padding: 20px;
}

/* Formulaire */
.awayout-channel-connect-form {
    display: flex;
    flex-direction: column;
}

.awayout-form-group {
    margin-bottom: 20px;
}

.awayout-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.awayout-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
}

.awayout-form-group input:focus {
    border-color: #0073e6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

.awayout-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.awayout-form-submit {
    padding: 10px 20px;
    background-color: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.awayout-form-submit:hover {
    background-color: #222;
}

.awayout-form-cancel {
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.awayout-form-cancel:hover {
    background-color: #e9ecef;
}

/* Messages de synchronisation */
.awayout-sync-status {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #0073e6;
    font-size: 13px;
    color: #333;
}

.awayout-sync-success {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e6f7e6;
    border-left: 3px solid #28a745;
    font-size: 13px;
    color: #28a745;
}

.awayout-sync-error {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #fff3f3;
    border-left: 3px solid #F97C5A;
    font-size: 13px;
    color: #F97C5A;
}

/* Message d'erreur */
.awayout-channel-manager-error {
    padding: 20px;
    background-color: #fff3f3;
    border-left: 4px solid #F97C5A;
    color: #333;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Composant de notifications */
.awayout-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
}

.awayout-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.awayout-notification-icon {
    margin-right: 15px;
    font-size: 20px;
    line-height: 1;
}

.awayout-notification-content {
    flex: 1;
}

.awayout-notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.awayout-notification-message {
    font-size: 14px;
    line-height: 1.4;
}

.awayout-notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: color 0.2s ease;
}

.awayout-notification-close:hover {
    color: rgba(0, 0, 0, 0.7);
}

/* Types de notifications */
.awayout-notification-success {
    background-color: #e6f7e6;
    border-left: 4px solid #28a745;
}

.awayout-notification-success .awayout-notification-icon {
    color: #28a745;
}

.awayout-notification-error {
    background-color: #fff3f3;
    border-left: 4px solid #e74c3c;
}

.awayout-notification-error .awayout-notification-icon {
    color: #e74c3c;
}

.awayout-notification-info {
    background-color: #e6f3ff;
    border-left: 4px solid #0073e6;
}

.awayout-notification-info .awayout-notification-icon {
    color: #0073e6;
}

.awayout-notification-warning {
    background-color: #fff8e6;
    border-left: 4px solid #f39c12;
}

.awayout-notification-warning .awayout-notification-icon {
    color: #f39c12;
}

/* Boutons de confirmation dans les notifications */
.awayout-notification-confirm-btn,
.awayout-notification-cancel-btn {
    margin-top: 10px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.awayout-notification-confirm-btn {
    background-color: #222;
    color: #fff;
    margin-right: 5px;
}

.awayout-notification-confirm-btn:hover {
    background-color: #333;
}

.awayout-notification-cancel-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.awayout-notification-cancel-btn:hover {
    background-color: #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .awayout-channel-manager-grid {
        grid-template-columns: 1fr;
    }
    
    .awayout-channel-modal-content {
        width: 90%;
    }
}
