/* Custom styles for Threat Intelligence Analysis Tool */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
}

/* TTP Cards */
.ttp-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.ttp-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ttp-card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px;
    display: flex;
    justify-content: between;
    align-items: center;
}

.ttp-card-body {
    padding: 15px;
}

.ttp-technique-id {
    font-weight: bold;
    color: #495057;
    font-size: 0.9em;
    margin-right: 10px;
}

.ttp-technique-name {
    font-weight: 600;
    color: #212529;
    flex-grow: 1;
}

.ttp-tactic {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 10px;
}

.ttp-description {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.ttp-confidence {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.confidence-high {
    background-color: #d4edda;
    color: #155724;
}

.confidence-medium {
    background-color: #fff3cd;
    color: #856404;
}

.confidence-low {
    background-color: #f8d7da;
    color: #721c24;
}

/* Category buttons */
.category-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.category-btn {
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background-color: #f8f9fa;
}

.category-btn.active {
    font-weight: 600;
    color: white;
}

.category-btn.detection.active {
    background-color: #28a745;
    border-color: #28a745;
}

.category-btn.hunt.active {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.category-btn.redteam.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

.category-btn.skip.active {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* TTP actions */
.ttp-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.ttp-action-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ttp-action-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}

/* User notes */
.user-notes {
    margin-top: 15px;
}

.user-notes textarea {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.9em;
    resize: vertical;
    min-height: 80px;
}

/* Refinement history */
.refinement-history {
    margin-top: 15px;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.refinement-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

.refinement-request {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.refinement-response {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.4;
}

.refinement-timestamp {
    font-size: 0.75em;
    color: #adb5bd;
    margin-top: 5px;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-uncategorized {
    background-color: #dee2e6;
}

.status-detection {
    background-color: #28a745;
}

.status-hunt {
    background-color: #17a2b8;
}

.status-redteam {
    background-color: #dc3545;
}

.status-skip {
    background-color: #6c757d;
}

/* Responsive design */
@media (max-width: 768px) {
    .category-buttons {
        flex-wrap: wrap;
    }
    
    .ttp-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .ttp-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ttp-tactic {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Enhanced card styling */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Custom alert styling */
.alert {
    border: none;
    border-radius: 6px;
}

/* Button customizations */
.btn {
    border-radius: 4px;
    font-weight: 500;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-warning:hover,
.btn-outline-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Textarea styling */
textarea.form-control {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

textarea.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Badge styling */
.badge {
    font-size: 0.8em;
    font-weight: 500;
}
