/* ============================================
   Exmoto Widget Styles - CSS Injector Rule
   ============================================ */

/* Основной контейнер виджета */
#root-exmoto {
    width: 100%;
    min-height: 200px;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Состояние загрузки */
#root-exmoto.exmoto-loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Анимация пульсации при загрузке */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Спиннер загрузки */
.exmoto-spinner-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.exmoto-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.exmoto-loading-text {
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* Состояние ошибки */
#root-exmoto.exmoto-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.exmoto-error-content {
    text-align: center;
    padding: 30px;
    color: #ffffff;
}

.exmoto-error-content p {
    margin: 10px 0;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

.exmoto-retry-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #f5576c;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.exmoto-retry-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Успешная загрузка */
#root-exmoto.exmoto-loaded {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    #root-exmoto {
        min-height: 150px;
    }
    
    .exmoto-spinner {
        width: 35px;
        height: 35px;
    }
    
    .exmoto-loading-text {
        font-size: 12px;
    }
    
    .exmoto-error-content p {
        font-size: 14px;
    }
    
    .exmoto-retry-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    #root-exmoto.exmoto-loading {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    }
    
    .exmoto-loading-text {
        color: #e0e0e0;
    }
}