/**
 * FCM Styles
 * 
 * Стили для интерфейса Firebase Cloud Messaging
 */

/* Основные стили для FCM */
.fcm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fcm-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
}

.fcm-header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 300;
}

.fcm-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Стили для админ-панели */
.fcm-admin-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin: 20px 0;
}

.fcm-admin-header {
    background: #f1f1f1;
    padding: 15px 20px;
    border-bottom: 1px solid #ccd0d4;
    border-radius: 4px 4px 0 0;
}

.fcm-admin-header h2 {
    margin: 0;
    color: #333;
}

.fcm-admin-content {
    padding: 20px;
}

/* Табы */
.fcm-tabs {
    border-bottom: 1px solid #ccd0d4;
    margin-bottom: 20px;
}

.fcm-tab-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.fcm-tab-item {
    margin: 0;
}

.fcm-tab-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.fcm-tab-link:hover {
    color: #0073aa;
    background: #f9f9f9;
}

.fcm-tab-link.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: #fff;
}

/* Формы */
.fcm-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
}

.fcm-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 10px;
}

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

.fcm-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.fcm-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.fcm-form-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.fcm-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.fcm-form-select {
    background: #fff;
    cursor: pointer;
}

.fcm-form-checkbox {
    margin-right: 8px;
}

.fcm-form-radio {
    margin-right: 8px;
}

.fcm-form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.fcm-form-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
}

/* Кнопки */
.fcm-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.fcm-btn-primary {
    background: #0073aa;
    color: white;
}

.fcm-btn-primary:hover {
    background: #005a87;
    color: white;
}

.fcm-btn-secondary {
    background: #f0f0f1;
    color: #333;
    border: 1px solid #ddd;
}

.fcm-btn-secondary:hover {
    background: #e0e0e1;
    color: #333;
}

.fcm-btn-success {
    background: #00a32a;
    color: white;
}

.fcm-btn-success:hover {
    background: #007a1f;
    color: white;
}

.fcm-btn-danger {
    background: #d63638;
    color: white;
}

.fcm-btn-danger:hover {
    background: #b32d2e;
    color: white;
}

.fcm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Статистические карточки */
.fcm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fcm-stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fcm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fcm-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
}

.fcm-stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fcm-stat-change {
    font-size: 12px;
    margin-top: 5px;
}

.fcm-stat-change.positive {
    color: #00a32a;
}

.fcm-stat-change.negative {
    color: #d63638;
}

/* Списки токенов */
.fcm-token-list {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    max-height: 500px;
    overflow-y: auto;
}

.fcm-token-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.fcm-token-item:hover {
    background: #f9f9f9;
}

.fcm-token-item:last-child {
    border-bottom: none;
}

.fcm-token-info {
    flex: 1;
}

.fcm-token-user {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.fcm-token-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.fcm-token-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fcm-token-status.success {
    background: #d4edda;
    color: #155724;
}

.fcm-token-status.invalid {
    background: #f8d7da;
    color: #721c24;
}

.fcm-token-status.pending {
    background: #fff3cd;
    color: #856404;
}

.fcm-token-status.not-registered {
    background: #e2e3e5;
    color: #383d41;
}

/* Таблицы */
.fcm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
}

.fcm-table th {
    background: #f1f1f1;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ccd0d4;
}

.fcm-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
}

.fcm-table tr:last-child td {
    border-bottom: none;
}

.fcm-table tr:hover {
    background: #f9f9f9;
}

/* Уведомления */
.fcm-notification {
    padding: 15px 20px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 4px solid;
}

.fcm-notification.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #00a32a;
}

.fcm-notification.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #d63638;
}

.fcm-notification.warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffb900;
}

.fcm-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #0073aa;
}

/* Прогресс-бары */
.fcm-progress {
    width: 100%;
    height: 8px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.fcm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a32a);
    transition: width 0.3s ease;
}

/* Модальные окна */
.fcm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.fcm-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.fcm-modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.fcm-modal-header h3 {
    margin: 0;
    color: #333;
}

.fcm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .fcm-container {
        padding: 10px;
    }
    
    .fcm-header h1 {
        font-size: 2em;
    }
    
    .fcm-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .fcm-stat-card {
        padding: 20px 15px;
    }
    
    .fcm-stat-number {
        font-size: 2em;
    }
    
    .fcm-tab-list {
        flex-direction: column;
    }
    
    .fcm-tab-link {
        border-bottom: 1px solid #f0f0f1;
        border-right: none;
    }
    
    .fcm-tab-link.active {
        border-bottom-color: #f0f0f1;
        border-left: 3px solid #0073aa;
    }
    
    .fcm-token-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .fcm-token-status {
        align-self: flex-end;
    }
    
    .fcm-table {
        font-size: 14px;
    }
    
    .fcm-table th,
    .fcm-table td {
        padding: 8px 10px;
    }
    
    .fcm-modal-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .fcm-header {
        padding: 20px 0;
    }
    
    .fcm-header h1 {
        font-size: 1.8em;
    }
    
    .fcm-stats {
        grid-template-columns: 1fr;
    }
    
    .fcm-form {
        padding: 20px 15px;
    }
    
    .fcm-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Анимации */
@keyframes fcm-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fcm-slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fcm-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fcm-fade-in {
    animation: fcm-fadeIn 0.5s ease-out;
}

.fcm-slide-in {
    animation: fcm-slideIn 0.3s ease-out;
}

.fcm-pulse {
    animation: fcm-pulse 2s infinite;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .fcm-container {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .fcm-admin-container {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .fcm-admin-header {
        background: #404040;
        border-color: #555;
    }
    
    .fcm-form {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .fcm-form-input {
        background: #404040;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .fcm-form-input:focus {
        border-color: #0073aa;
    }
    
    .fcm-stat-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .fcm-token-list {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .fcm-token-item:hover {
        background: #404040;
    }
    
    .fcm-table {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .fcm-table th {
        background: #404040;
        border-color: #555;
    }
    
    .fcm-table tr:hover {
        background: #404040;
    }
}

/* Утилиты */
.fcm-text-center {
    text-align: center;
}

.fcm-text-left {
    text-align: left;
}

.fcm-text-right {
    text-align: right;
}

.fcm-mb-0 {
    margin-bottom: 0;
}

.fcm-mb-1 {
    margin-bottom: 10px;
}

.fcm-mb-2 {
    margin-bottom: 20px;
}

.fcm-mb-3 {
    margin-bottom: 30px;
}

.fcm-mt-0 {
    margin-top: 0;
}

.fcm-mt-1 {
    margin-top: 10px;
}

.fcm-mt-2 {
    margin-top: 20px;
}

.fcm-mt-3 {
    margin-top: 30px;
}

.fcm-hidden {
    display: none;
}

.fcm-visible {
    display: block;
}

.fcm-flex {
    display: flex;
}

.fcm-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcm-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fcm-flex-wrap {
    flex-wrap: wrap;
}

.fcm-gap-1 {
    gap: 10px;
}

.fcm-gap-2 {
    gap: 20px;
}

.fcm-gap-3 {
    gap: 30px;
}
