/**
 * Spisová služba - Custom Styles
 */

/* Layout constraints */
.container {
    max-width: 1200px;
}

/* Body and footer positioning */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation active state */
.navbar .nav-link.active {
    font-weight: 600;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

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

/* Tables */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Status badges */
.badge-status-active {
    background-color: #198754;
}

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

.badge-status-closed {
    background-color: #dc3545;
}

/* Message thread styling */
.message-thread {
    border-left: 3px solid #dee2e6;
    margin-left: 1rem;
    padding-left: 1rem;
}

.message-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
}

.message-item.incoming {
    border-left: 4px solid #0d6efd;
}

.message-item.outgoing {
    border-left: 4px solid #198754;
}

.message-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Attachment list */
.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-list li {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.attachment-list li:last-child {
    border-bottom: none;
}

/* Data box indicators */
.databox-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.databox-status.active {
    background-color: #198754;
}

.databox-status.inactive {
    background-color: #dc3545;
}

.databox-status.test {
    background-color: #ffc107;
}

/* Form styling */
.form-label.required::after {
    content: " *";
    color: #dc3545;
}

/* EasyMDE overrides */
.EasyMDEContainer {
    margin-bottom: 1rem;
}

.EasyMDEContainer .CodeMirror {
    border-radius: 0.375rem;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Action buttons in tables */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Inbox unread indicator */
.unread {
    font-weight: 600;
    background-color: #fff3cd;
}

/* Case status colors */
.case-open {
    color: #198754;
}

.case-closed {
    color: #6c757d;
}

/* Participant role badges */
.role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-action {
        padding: 0.5rem;
    }

    .message-item {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }
}
