/**
 * Telegram Auth Plugin Styles
 */

/* Контейнер для виджета */
.telegram-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 15px 0;
}

.telegram-login-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Кнопка входа */
.telegram-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.telegram-login-btn:hover {
    background: linear-gradient(135deg, #0077b5 0%, #006699 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.telegram-login-btn svg {
    width: 20px;
    height: 20px;
}

/* Контейнер привязки */
.telegram-link-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    text-align: center;
    margin: 15px 0;
}

.telegram-link-container p {
    margin-bottom: 15px;
    color: #495057;
}

/* Уже привязан */
.telegram-linked {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.telegram-linked .dashicons {
    color: #28a745;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Профиль Telegram */
.telegram-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 15px 0;
}

.telegram-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0088cc;
}

.telegram-info p {
    margin: 0 0 10px 0;
    color: #495057;
}

/* Кнопка отвязки */
.telegram-unlink {
    color: #dc3545 !important;
    text-decoration: none;
    font-size: 13px;
}

.telegram-unlink:hover {
    color: #c82333 !important;
}

/* Уже авторизован */
.telegram-already-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    color: #0056b3;
}

.telegram-already-logged-in .dashicons {
    color: #28a745;
}

/* Ошибка */
.telegram-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* Успех */
.telegram-success {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

/* Индикатор загрузки */
.telegram-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: telegram-spin 1s linear infinite;
}

@keyframes telegram-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Виджет Telegram */
.telegram-login-container iframe {
    border-radius: 8px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .telegram-login-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .telegram-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .telegram-info {
        text-align: center;
    }
}

/* Для страницы настроек админки */
.telegram-auth-admin-wrap {
    max-width: 800px;
    margin: 20px 0;
}

.telegram-auth-admin-wrap h2 {
    margin-bottom: 20px;
}

.telegram-auth-admin-wrap .form-table {
    margin-top: 20px;
}

.telegram-auth-admin-wrap .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Информационный блок */
.telegram-info-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #0088cc;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.telegram-info-box h3 {
    margin-top: 0;
    color: #0088cc;
}

.telegram-info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.telegram-info-box li {
    margin: 5px 0;
}

/* Шорткоды справка */
.telegram-shortcodes-help {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.telegram-shortcodes-help code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}
