/**
 * Custom Styles
 * TheDatabase - Plain PHP Application
 */

/* Login Page Banner */
.bg-primary {
    background-color: #0d6efd !important;
}

.login-banner {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.login-banner h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

/* Footer */
footer {
    border-top: 1px solid #dee2e6;
}

/* Dashboard Styles */
.dashboard-panel {
    transition: transform 0.2s ease-in-out;
}

.dashboard-panel:hover {
    transform: translateY(-2px);
}

.card-header {
    font-weight: 600;
}

.card-header i {
    margin-right: 0.5rem;
}

/* Company List Styles */
.company-list-table tbody tr {
    cursor: pointer;
}

.company-list-table tbody tr:hover {
    background-color: #f8f9fa;
}

.company-list-table tbody tr:active {
    background-color: #e9ecef;
}

.company-list-table tbody tr.table-active {
    background-color: #0d6efd;
    color: white;
}

.company-list-table tbody tr.table-active td {
    color: white;
}

/* Company Details Styles */
.company-details-content {
    font-size: 0.9rem;
}

.company-details-content h6 {
    color: #198754;
    border-bottom: 2px solid #198754;
    padding-bottom: 0.5rem;
}

.company-details-content strong {
    color: #495057;
    display: inline-block;
    min-width: 120px;
}

.company-details-content a {
    color: #0d6efd;
    text-decoration: none;
}

.company-details-content a:hover {
    text-decoration: underline;
}

/* Action List Styles */
.action-list-table {
    font-size: 0.85rem;
}

.action-list-table tbody tr:hover {
    background-color: #f8f9fa;
}

.action-list-table .badge {
    font-size: 0.75rem;
}

/* Comms Log Styles */
.comms-log-content {
    font-size: 0.85rem;
}

.comms-log-entry {
    font-size: 0.9rem;
}

.comms-log-entry:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.comms-log-entry strong {
    color: #495057;
}

.comms-log-entry .text-muted {
    color: #6c757d !important;
}

/* To Do List Styles */
.todo-list-content {
    font-size: 0.85rem;
}

.todo-item {
    font-size: 0.9rem;
}

.todo-item-closed {
    font-size: 0.9rem;
    background-color: #000000;
    color: #ffffff;
    padding: 0.75rem;
    margin: 0 -0.75rem;
    border-radius: 0.25rem;
}

.todo-item:last-child,
.todo-item-closed:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0.75rem !important;
}

.todo-item strong {
    color: #495057;
}

.todo-item .text-muted {
    color: #6c757d !important;
}

.todo-item-closed strong {
    color: #ffffff;
}

.todo-item-closed .text-white {
    color: #ffffff !important;
}

/* Context Menu Styles */
.context-menu {
    position: fixed;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1050;
    width: 200px;
    max-width: 200px;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.context-menu ul {
    margin: 0;
    padding: 0;
}

.context-menu-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.15s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
    color: #212529;
    text-decoration: none;
}

.context-menu-item i {
    margin-right: 0.5rem;
    width: 16px;
}

.context-menu-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Comms Log ID styling */
.comms-log-id:hover {
    text-decoration: underline;
    color: #0d6efd !important;
}

/* To Do List ID styling */
.todo-item-id:hover {
    text-decoration: underline;
    color: #0d6efd !important;
}

/* Company Actions Styles */
.company-actions-list {
    font-size: 0.85rem;
}

.company-actions-list .badge {
    font-size: 0.7rem;
}

/* Panel Cards - Fill Height */
.card.d-flex.flex-column {
    display: flex;
    flex-direction: column;
}

.card.d-flex.flex-column .card-header {
    flex-shrink: 0;
}

.card.d-flex.flex-column .card-body.flex-grow-1 {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Readonly input fields - grey background */
input[readonly],
input[readonly]:focus {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}


/* Panel Flexbox Styles */
.card.d-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.card.d-flex .card-header {
    flex-shrink: 0;
}

.card.d-flex .card-body.flex-grow-1 {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.card.d-flex .card-body.overflow-auto {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-banner h1 {
        font-size: 2.5rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

