/* Taskering CRM - Komponenty CSS */

/* ===== Progress Bar Komponenty ===== */
.progress-compact {
    width: 100px;
}

.progress-compact .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== Chart Container ===== */
.chart-container {
    height: 300px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.chart-placeholder img {
    opacity: 0.5;
    margin-bottom: 1rem;
}

.chart-placeholder h6 {
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
}

.chart-placeholder p {
    color: var(--bs-secondary);
    margin: 0;
}

/* ===== Hidden Forms ===== */
.hidden-form {
    display: none;
}

/* ===== Table Progress Bars ===== */
.table-progress {
    width: 100px;
}

.table-progress .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
    min-width: 2rem;
}

/* ===== Responsive Progress Bars ===== */
@media (max-width: 576px) {
    .progress-compact,
    .table-progress {
        width: 80px;
    }
    
    .progress-compact .progress-bar,
    .table-progress .progress-bar {
        font-size: 0.7rem;
    }
}

/* ===== Dashboard Specific Styles ===== */
.dashboard-stats-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-project-table .progress {
    width: 100px;
}

.dashboard-project-table .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== Reports Specific Styles ===== */
.reports-chart-container {
    height: 300px;
    position: relative;
}

.reports-chart-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

/* ===== Tasks Specific Styles ===== */
.tasks-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.tasks-table .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* ===== Time Records Specific Styles ===== */
.time-records-table .badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.time-records-table .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* ===== Users Specific Styles ===== */
.users-table .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.users-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ===== Projects Specific Styles ===== */
.projects-table .progress {
    width: 100px;
}

.projects-table .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
    min-width: 2rem;
}

.projects-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ===== Utility Classes for Inline Styles ===== */
.w-100px {
    width: 100px !important;
}

.h-300px {
    height: 300px !important;
}

.d-none {
    display: none !important;
}

/* ===== Print Styles ===== */
@media print {
    .progress-compact,
    .table-progress,
    .dashboard-project-table .progress,
    .projects-table .progress {
        width: 60px !important;
    }
    
    .chart-container,
    .reports-chart-container {
        height: 200px !important;
    }
}

/* ===== Sidebar Rychlé akce ===== */
.sidebar-quick-actions {
    padding: 0 1rem;
}

.sidebar-quick-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s ease;
}

.sidebar-quick-actions .btn:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-quick-actions .btn img {
    opacity: 0.8;
}

.sidebar-quick-actions .btn:hover img {
    opacity: 1;
}

.sidebar-divider {
    margin: 1rem;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

/* ===== Responsivní úpravy pro rychlé akce ===== */
@media (max-width: 768px) {
    .sidebar-quick-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .sidebar-quick-actions .btn img {
        width: 12px;
        height: 12px;
    }
}

/* ===== Messenger styl komentářů ===== */
#commentsContainer {
    padding: 1rem 0;
}

#commentsContainer .d-flex {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Komentář klienta (vlevo) */
#commentsContainer .justify-content-start .bg-light {
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#commentsContainer .justify-content-start .bg-light:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Komentář řešitele/admina (vpravo) */
#commentsContainer .justify-content-end .bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    box-shadow: 0 2px 4px rgba(13,110,253,0.3);
}

#commentsContainer .justify-content-end .bg-primary:hover {
    box-shadow: 0 3px 6px rgba(13,110,253,0.4);
}

/* Odkaz na uživatele v komentáři */
#commentsContainer a:hover {
    text-decoration: underline !important;
}

/* Scrollbar pro kontejner komentářů */
#commentsContainer::-webkit-scrollbar {
    width: 8px;
}

#commentsContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#commentsContainer::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#commentsContainer::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsivní úpravy pro komentáře */
@media (max-width: 768px) {
    #commentsContainer .rounded {
        max-width: 85% !important;
        font-size: 0.9rem;
    }
    
    #commentsContainer small {
        font-size: 0.7rem !important;
    }
}

/* ===== Inbox položky - rozlišení typů ===== */
.inbox-ticket {
    border-left: 3px solid #0d6efd;
}

.inbox-comment {
    border-left: 3px solid #ffc107;
    background-color: #fffbf0;
}

.inbox-comment:hover {
    background-color: #fff8e1;
}

.inbox-item {
    transition: all 0.2s ease;
}

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

/* Ikony v inbox položkách */
.inbox-item img {
    vertical-align: middle;
}

/* ===== Inline editace - hover efekt ===== */
.hover-edit {
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.hover-edit:hover {
    background-color: #f8f9fa;
    outline: 1px dashed #dee2e6;
}

.hover-edit:hover::after {
    content: ' ✏️';
    font-size: 0.8em;
    opacity: 0.5;
}

/* ===== Travel Orders - Koncepty ===== */
.table .table-warning {
    background-color: #fff3cd !important;
    opacity: 0.85;
}

.table .table-warning:hover {
    background-color: #ffecb5 !important;
    opacity: 1;
}
