/**
 * Alerts Tab Styles
 */

.alerts-container {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.alerts-header h2 {
    margin: 0;
    font-size: 20px;
    color: #e7e9ea;
}

/* Sections */
.alerts-section {
    background: #16181c;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2f3336;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    color: #e7e9ea;
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* Rules List */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1d1f23;
    border-radius: 8px;
    transition: background 0.2s;
}

.rule-item:hover {
    background: #22252a;
}

.rule-item.disabled {
    opacity: 0.5;
}

.rule-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.rule-info {
    flex: 1;
    min-width: 0;
}

.rule-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #e7e9ea;
}

.rule-icon {
    font-size: 16px;
}

.rule-type-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: #2f3336;
    border-radius: 4px;
    color: #8b98a5;
}

.rule-description {
    font-size: 12px;
    color: #8b98a5;
    margin-top: 4px;
}

.rule-stats {
    font-size: 12px;
    color: #8b98a5;
    white-space: nowrap;
}

.rule-actions {
    display: flex;
    gap: 6px;
}

/* History List */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #2f3336;
}

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

.history-time {
    font-size: 12px;
    color: #8b98a5;
    min-width: 60px;
}

.history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 13px;
    color: #e7e9ea;
    font-weight: 500;
}

.history-body {
    font-size: 12px;
    color: #8b98a5;
    margin-top: 2px;
}

/* Channels List */
.channels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #1d1f23;
    border-radius: 8px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-name {
    font-size: 14px;
    color: #e7e9ea;
}

.channel-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.channel-status.status-ok {
    background: rgba(0, 186, 124, 0.15);
    color: #00ba7c;
}

.channel-status.status-error {
    background: rgba(249, 24, 128, 0.15);
    color: #f91880;
}

.channel-status.status-pending {
    background: rgba(139, 152, 165, 0.15);
    color: #8b98a5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #8b98a5;
}

.empty-state p {
    margin: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #16181c;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #2f3336;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #e7e9ea;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8b98a5;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #e7e9ea;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #2f3336;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #8b98a5;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #1d1f23;
    border: 1px solid #2f3336;
    border-radius: 8px;
    color: #e7e9ea;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1d9bf0;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-divider {
    height: 1px;
    background: #2f3336;
    margin: 20px 0;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #e7e9ea;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .alerts-container {
        padding: 12px;
    }

    .alerts-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .alerts-header h2 {
        font-size: 18px;
    }

    .alerts-section {
        padding: 12px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .section-header h3 {
        font-size: 15px;
    }

    .section-actions {
        width: 100%;
    }

    .section-actions .btn {
        flex: 1;
    }

    .rule-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .rule-checkbox {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .rule-actions {
        width: 100%;
    }

    .rule-actions .btn {
        flex: 1;
    }

    .channel-item {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .channel-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .form-row {
        flex-direction: column;
    }
}
