/* Legacy shared styles. The Printbox monitoring workspace intentionally keeps this visual system. */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Footer */
.footer {
    padding: 20px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e7e7e7;
    margin-top: auto;
}

/* Navbar styling */
.navbar-brand {
    font-weight: bold;
    letter-spacing: 1px;
}

/* Card styling */
.card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Button styles */
.btn {
    border-radius: 6px;
}

.btn-lg {
    padding: 12px 20px;
    font-weight: 500;
}

.btn i {
    margin-right: 8px;
}

/* Dashboard cards */
.dashboard-card {
    height: 100%;
}

/* Animation for dashboard cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard .card {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.dashboard .card:nth-child(1) {
    animation-delay: 0.1s;
}

.dashboard .card:nth-child(2) {
    animation-delay: 0.2s;
}

.dashboard .card:nth-child(3) {
    animation-delay: 0.3s;
}

.dashboard .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 0 auto;
}

#error-message {
    display: none;
    margin-top: 20px;
}

/* Login page specific styles */
.login-card {
    max-width: 500px;
    margin: 0 auto;
    margin-top: 10vh;
}

/* Printbox name styling - uppercase and replace underscore with space */
.printbox-name {
    text-transform: uppercase;
    font-weight: 600;
}

.printbox-name::before {
    content: attr(data-name);
    display: inline;
}

/* Alternative method using JavaScript replacement */
.printbox-name-formatted {
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    max-width: 170px;
    /* Account for status circle space */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Row background colors based on printbox status */
.status-row-maintenance {
    background-color: rgba(255, 193, 7, 0.1) !important;
    /* Light yellow for maintenance */
}

.status-row-inactive {
    background-color: rgba(220, 53, 69, 0.1) !important;
    /* Light red for inactive/dead */
}

.status-row-printing {
    background-color: rgba(23, 162, 184, 0.1) !important;
    /* Light blue for printing */
}

/* Active status doesn't need background color - stays default */

/* Status indicator circles */
.status-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    cursor: help;
    position: relative;
}

.status-circle.online {
    background-color: #28a745;
    /* Green for online/active */
}

.status-circle.maintenance {
    background-color: #ffc107;
    /* Yellow for maintenance */
}

.status-circle.maintenance-machine {
    background-color: #fd7e14;
    /* Orange for machine maintenance */
}

.status-circle.offline {
    background-color: #dc3545;
    /* Red for offline/dead */
}

/* Table column width adjustments */
.table th:nth-child(1),
.table td:nth-child(1) {
    max-width: 150px;
    /* Limit name column to approximately 25 characters */
    width: 150px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 120px;
    /* Paper column width */
    min-width: 120px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    width: 100px;
    /* AnyDesk ID column */
}

.table th:nth-child(4),
.table td:nth-child(4) {
    width: 80px;
    /* Version column */
}

.table th:nth-child(5),
.table td:nth-child(5) {
    width: 100px;
    /* Last Active column */
}

.table th:nth-child(6),
.table td:nth-child(6) {
    width: 100px;
    /* Actions column */
}

/* Attention table has different column structure */
#attention-table th:nth-child(2),
#attention-table td:nth-child(2) {
    width: 150px;
    /* Issue column */
}

#attention-table th:nth-child(3),
#attention-table td:nth-child(3) {
    width: 120px;
    /* Paper column */
    min-width: 120px;
}

#attention-table th:nth-child(4),
#attention-table td:nth-child(4) {
    width: 100px;
    /* AnyDesk ID column */
}

#attention-table th:nth-child(5),
#attention-table td:nth-child(5) {
    width: 80px;
    /* Version column */
}

#attention-table th:nth-child(6),
#attention-table td:nth-child(6) {
    width: 100px;
    /* Last Active column */
}

#attention-table th:nth-child(7),
#attention-table td:nth-child(7) {
    width: 100px;
    /* Actions column */
}

/* AnyDesk ID and Version styling */
.anydesk-badge {
    background-color: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.anydesk-badge:hover {
    background-color: #c0392b;
    color: white;
}

.version-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

/* Copy notification */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.copy-notification.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
