/* BugTracker Module Styles */

/* Container */
.bugtracker-module {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.bugtracker-module .card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.bugtracker-module .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.bugtracker-module .card-header h2,
.bugtracker-module .card-header h3,
.bugtracker-module .card-header h4,
.bugtracker-module .card-header h5 {
    margin: 0;
}

/* Table */
.nice_table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.nice_table th,
.nice_table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.nice_table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    border-top: none;
    background-color: #f8f9fa;
    font-weight: 600;
}

.nice_table tbody tr:hover {
    background-color: rgba(0,0,0,.02);
}

.bug-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.bug-row:hover {
    background-color: rgba(0,123,255,0.05);
}

.bug-title {
    color: #212529;
    text-decoration: none;
    font-weight: 500;
}

.bug-title:hover {
    color: #0d6efd;
    text-decoration: none;
}

/* Badges */
.badge {
    padding: 0.25em 0.5em;
    font-size: 75%;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* Vote Score */
.vote-score {
    font-weight: 600;
    font-size: 1.1em;
}

.vote-score.positive {
    color: #28a745;
}

.vote-score.negative {
    color: #dc3545;
}

.vote-score-lg {
    font-size: 1.5em;
    font-weight: bold;
}

/* Vote Section */
.vote-section {
    border-radius: 0.5rem;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
}

.vote-buttons .btn {
    min-width: 60px;
}

.vote-buttons .btn.active {
    opacity: 0.7;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}

/* Bug Meta */
.bug-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.bug-meta span {
    display: inline-flex;
    align-items: center;
}

/* Bug Content */
.content-box {
    min-height: 100px;
}

.content-box ol {
    margin: 0;
    padding-left: 1.5rem;
}

.content-box ol li {
    margin-bottom: 0.5rem;
}

/* Screenshot */
.screenshot-preview {
    max-width: 400px;
    border: 2px solid #dee2e6;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.screenshot-preview img {
    max-width: 100%;
    border-radius: 0.25rem;
}

.screenshot-link {
    display: inline-block;
    transition: transform 0.2s;
}

.screenshot-link:hover {
    transform: scale(1.02);
}

/* Comments */
.comment-item {
    border-radius: 0.5rem;
    transition: box-shadow 0.2s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-header strong {
    color: #495057;
}

.comment-content {
    color: #6c757d;
    line-height: 1.5;
}

/* Form Styles */
.required {
    color: #dc3545;
    font-weight: bold;
}

/* Form Group */
.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Custom File Input */
.custom-file {
    margin-bottom: 1rem;
}

.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Buttons */
#submit-btn {
    min-width: 200px;
}

#comment-submit-btn {
    min-width: 150px;
}

/* Pagination */
.pagination {
    margin-top: 1rem;
}

.page-link {
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
}

.alert-info {
    color: #055160;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Responsive */
@media (max-width: 768px) {
    .bugtracker-module {
        padding: 0 10px;
    }

    .bug-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nice_table {
        font-size: 0.9em;
    }

    .vote-buttons {
        flex-direction: column;
    }

    .vote-buttons .btn {
        width: 100%;
    }
}

/* Loading Spinner */
.fa-spinner.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Transitions */
a {
    transition: color 0.15s ease-in-out;
}

.btn {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Fix for modal z-index */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Utility */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-muted {
    color: #6c757d !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #fff !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.rounded {
    border-radius: 0.25rem !important;
}
