/* ============================================================================
   OAGE BBB Frontend Styles
   ============================================================================ */

.bbb-room-card {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-top: 4px solid #0e3a5f;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bbb-room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Header */
.bbb-room-header {
    padding: 25px;
    color: white;
    text-align: center;
    position: relative;
}

.bbb-room-logo {
    max-width: 80px;
    max-height: 80px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.bbb-room-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
}

.bbb-room-status {
    margin-top: 10px;
}

.bbb-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.bbb-status-badge.active {
    background: rgba(40, 167, 69, 0.9);
}

.bbb-status-badge.inactive {
    background: rgba(108, 117, 125, 0.7);
}

.bbb-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Body */
.bbb-room-body {
    padding: 25px;
}

.bbb-room-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.bbb-room-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.bbb-info-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.bbb-info-item:last-child {
    border-bottom: none;
}

.bbb-icon {
    font-size: 20px;
    margin-right: 10px;
    width: 30px;
    text-align: center;
}

.bbb-info-label {
    flex: 1;
    font-weight: 600;
    color: #495057;
}

.bbb-info-value {
    color: #6c757d;
    font-weight: 500;
}

/* Botones */
.bbb-room-actions {
    text-align: center;
}

.bbb-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.bbb-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bbb-button-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.02);
}

.bbb-button-primary:active {
    transform: scale(0.98);
}

.bbb-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Mensajes */
.bbb-room-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.bbb-room-message.loading {
    background: #d1ecf1;
    color: #0c5460;
}

.bbb-room-message.error {
    background: #f8d7da;
    color: #721c24;
}

.bbb-room-message.success {
    background: #d4edda;
    color: #155724;
}

/* Login Required */
.bbb-login-required {
    max-width: 400px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.bbb-login-required .bbb-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.bbb-login-required h3 {
    margin: 0 0 15px 0;
    color: #23282d;
}

.bbb-login-required p {
    color: #666;
    margin-bottom: 25px;
}

/* Error Messages */
.bbb-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    margin: 20px 0;
}

/* Offline Warning */
.bbb-offline-warning {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    text-align: center;
}

.bbb-offline-warning .bbb-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.bbb-offline-warning h3 {
    color: #856404;
    margin-bottom: 10px;
}

.bbb-offline-warning p {
    color: #856404;
}

/* Responsive */
@media (max-width: 768px) {
    .bbb-room-card {
        margin: 20px 15px;
    }
    
    .bbb-room-title {
        font-size: 20px;
    }
    
    .bbb-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Loading Spinner */
.bbb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ============================================================================
   VISTA PREVIA DE SALA (Tarjeta clickeable)
   ============================================================================ */

.bbb-room-preview {
    max-width: 350px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #0e3a5f;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bbb-room-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.bbb-room-preview-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.bbb-room-preview-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbb-room-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.bbb-room-preview:hover .bbb-room-preview-image img {
    transform: scale(1.05);
}

.bbb-room-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.bbb-icon-large {
    font-size: 64px;
    opacity: 0.9;
}

.bbb-room-preview-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.95);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bbb-room-preview-info {
    padding: 20px;
}

.bbb-room-preview-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #23282d;
}

.bbb-room-preview-meta {
    margin: 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbb-room-preview-meta .bbb-icon {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .bbb-room-preview {
        margin: 15px;
    }
    
    .bbb-room-preview-image {
        height: 180px;
    }
}
