/* Global Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c2c2c;
    background-color: #f7f9fc;
    margin-right: 20px;
    padding: 0;
}

/* Registration Form Layout */
.qms-registration-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    padding: 40px;
    flex-wrap: wrap;
}

.qms-registration-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qms-form-group {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
}

.qms-label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #333;
}

.qms-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.qms-button {
    background-color: #0066ff;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.qms-button:hover {
    background-color: #004ec2;
}

/* QR Display */
.qms-registration-qr img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Personalized Queue Display */
.qms-personal-status {
text-align: center;
    font-size: 28px;
    padding: 30px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin-top: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: stretch;
    justify-content: space-evenly;
    align-items: center;
}

.qms-current-visitor {
    font-size: 48px;
    font-weight: bold;
    padding: 20px;
    color: #e32020;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-left: 10px;
}

span.qms-ticket {
    font-size: 48px;
    font-weight: bold;
}

span.qms-room {
    font-size: 36px;
    color: #6c2bd9;
}

/* Admin Table */
.qms-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 30px;
    overflow: hidden;
}

.qms-table-header th {
    background: #1e1e2f;
    color: #fff;
    padding: 12px;
    text-align: left;
}

.qms-table td {
    padding: 12px;
    border-bottom: 1px solid #eaeaea;
}

.qms-table tr:hover {
    background-color: #f1f3f9;
}

/* Status Labels */
.qms-state-label {
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    text-align: center;
}

.qms-state-waiting    { background-color: #f5a623; color: #fff; }
.qms-state-called     { background-color: #007bff; color: #fff; }
.qms-state-service    { background-color: #28a745; color: #fff; }
.qms-state-finished   { background-color: #6c757d; color: #fff; }
.qms-state-noshow     { background-color: #dc3545; color: #fff; }

/* Dropdowns */
.qms-room-select,
.qms-status-dropdown {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    margin-bottom: 6px;
}

/* Notifications */
.qms-notification.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    margin: 20px 0;
}

/* Action Links */

.qms-delete-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border-radius: 50%;
}

}

.qms-delete-link:hover {
    background-color: #ffe6e6;
    border-color: #dc3545;
}

.qms-delete-link .dashicons {
    font-size: 18px;
    color: #dc3545;
    line-height: 1;
}

/* Top Controls Wrapper */
.qms-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 10px;
}

/* Dropdown inside table control */
.qms-pagination-wrapper select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Pagination */
.qms-pagination {
    display: flex;
    gap: 8px;
}

.qms-pagination a {
    text-decoration: none;
    padding: 6px 10px;
    background-color: #eee;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
}

.qms-pagination a:hover {
    background-color: #ddd;
}

/* Queue Status Page Styling */
.qms-status-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px;
    background-color: #f9f9ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.qms-current-token-card {
    flex: 1 1 400px;
    background: #ffffff;
    border: 3px solid #dcdcff;
    border-radius: 20px;
    text-align: center;
    padding: 40px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.qms-current-title {
    font-size: 22px;
    color: #6c63ff;
    font-weight: 600;
    margin-bottom: 10px;
}

.qms-token-label {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.qms-token-value {
    font-size: 72px;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 20px;
}

.qms-wait-time {
    font-size: 18px;
    color: #777;
}
.qms-wait-time span {
    font-size: 28px;
    font-weight: 600;
    display: block;
    color: #333;
}

.qms-token-list {
    flex: 1 1 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    align-content: start;
}

.qms-token-entry {
    background: #6c63ff;
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.qms-token-id {
    display: block;
    font-size: 24px;
}

.qms-token-room {
    font-size: 14px;
    opacity: 0.9;
}

/* Queue Status Display */
.qms-status-display {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin: 40px auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.qms-status-display h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 30px;
}

.qms-current-visitor {
    background-color: #f0f4ff;
    border: 2px solid #007bff;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    font-size: 42px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
}

.qms-room {
    display: block;
    font-size: 24px;
    color: #6c2bd9;
    margin-top: 6px;
}

.qms-next-visitors {
    margin-top: 30px;
    font-size: 20px;
    color: #555;
}

.qms-next-visitors strong {
    display: inline-block;
    background-color: #e9ecef;
    padding: 8px 16px;
    border-radius: 8px;
    margin: 0 5px;
    font-weight: bold;
}

.qms-waiting-count {
    margin-top: 20px;
    font-size: 18px;
    color: #999;
}

.qms-wait-low {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: 500;
}

.qms-wait-mid {
    background-color: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: 500;
}

.qms-wait-high {
    background-color: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: 500;
}

.qms-waiting-priority {
    background-color: #fff7e6 !important;
    border-left: 6px solid #ffa500;
    font-weight: 600;
}

.qms-status-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: center;
}

.qms-status-filter-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin-left: 10px;
    font-size: 14px;
}

.qms-status-filter-link .dashicons {
    font-size: 16px;
    line-height: 1;
    margin-right: 4px;
}

.qms-status-filter-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: #e0e7ff;
    color: #3742fa;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin-left:10px;
}

.qms-status-filter-link:hover {
    opacity: 0.9;
}

.qms-status-filter-link.active {
    border-color: #3742fa;
    
}

.qms-status-filter-link.default {
    background-color: #e9ecef;
    color: #333;
}

.qms-status-filter-link.waiting {
    background-color: #f5a623;
    color: #fff;
}

.qms-status-filter-link.called_to {
    background-color: #007bff;
    color: #fff;
}

.qms-status-filter-link.in_service {
    background-color: #28a745;
    color: #fff;
}

.qms-status-filter-link.finished {
    background-color: #6c757d;
    color: #fff;
}

.qms-status-filter-link.no_show {
    background-color: #dc3545;
    color: #fff;
}

.qms-state-deleted {
    background-color: #343a40;
    color: #fff;
}

.qms-status-filter-link.deleted {
    background-color: #343a40;
    color: #fff;
}
.qms-status-filter-link.deleted:hover {
    background-color: #23272b;
}

.qms-status-filter-link.live-toggle {
    background-color: #f0f9ff;
    color: #007bff;
    border: 1px solid transparent;
}

.qms-status-filter-link.live-toggle.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.qms-status-filter-link.live-toggle:hover {
    background-color: #e6f2ff;
}

.qms-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.qms-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    position: relative;
}

.qms-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px; right: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.qms-modal-close:hover {
    color: #333;
}

.qms-table td:nth-child(11) {
    white-space: nowrap;
    max-width: 180px;
    overflow-x: auto;
}

.qms-status-history-cell {
    max-width: 160px;
    word-wrap: break-word;
}
.qms-toggle-history {
    cursor: pointer;
    display: inline-block;
    margin-bottom: 5px;
    color: #0073aa;
}
.qms-toggle-history:hover {
    text-decoration: underline;
}


