#hmp-tracking-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#hmp-tracking-search-form {
    display: flex;
    margin-bottom: 20px;
}

#hmp-tracking-reference {
    flex-grow: 1;
    padding: 10px;
    margin-right: 10px;
}

#hmp-tracking-search-form button {
    padding: 10px 20px;
}

#hmp-tracking-result,
#hmp-tracking-error {
    margin-top: 20px;
}

#hmp-tracking-error {
    color: red;
    border: 1px solid red;
    padding: 10px;
    background-color: #ffeeee;
}

.hidden {
    display: none;
}

/* Verbesserte Stile für die Frontend-Ergebnistabellen */
#hmp-status-history,
#hmp-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#hmp-status-history th,
#hmp-results-table th {
    background-color: #0073aa;
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    position: relative;
    transition: background-color 0.3s;
}

#hmp-status-history thead tr th:first-child,
#hmp-results-table thead tr th:first-child {
    border-top-left-radius: 5px;
}

#hmp-status-history thead tr th:last-child,
#hmp-results-table thead tr th:last-child {
    border-top-right-radius: 5px;
}

#hmp-status-history th:after,
#hmp-results-table th:after {
    content: '';
    position: absolute;
    right: 0;
    height: 50%;
    top: 25%;
    width: 1px;
    background-color: rgba(255,255,255,0.3);
}

#hmp-status-history th:last-child:after,
#hmp-results-table th:last-child:after {
    display: none;
}

#hmp-status-history td,
#hmp-results-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease-in-out;
}

#hmp-status-history tr:last-child td,
#hmp-results-table tr:last-child td {
    border-bottom: none;
}

#hmp-status-history tr:nth-child(even),
#hmp-results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#hmp-status-history tr:hover td,
#hmp-results-table tr:hover td {
    background-color: #f0f7fb;
}

/* Anzeigen-Button im Ergebnistisch */
.view-details-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.view-details-btn:hover {
    background-color: #005a87;
}

.view-details-btn:active {
    background-color: #004d74;
    transform: translateY(1px);
}

/* Status Styling */
#hmp-status-history td:nth-child(2),
#hmp-results-table td:nth-child(3) {
    font-weight: 500;
}

/* Datum Styling */
#hmp-status-history td:nth-child(1),
#hmp-results-table td:nth-child(2) {
    white-space: nowrap;
}

/* Referenz Styling */
#hmp-results-table td:nth-child(1) {
    font-weight: 500;
}

/* Modal-Styling */
.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);
    opacity: 0;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    width: 80%;
    max-width: 700px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

/* Styling für den Modal-Inhalt */
#modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    padding-right: 30px; /* Platz für den Close-Button */
}

#modal-content h4 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #444;
    font-size: 16px;
}

#modal-content .shipment-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 5px;
}

#modal-content .shipment-details p {
    margin: 8px 0;
    line-height: 1.5;
}

/* Status-Tabelle im Modal */
#modal-content .status-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
}

#modal-content .status-table th {
    background-color: #f2f2f2;
    padding: 10px 15px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #ddd;
}

#modal-content .status-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eaeaea;
}

#modal-content .status-table tr:last-child td {
    border-bottom: none;
}

#modal-content .status-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Loading-Animation im Modal */
#modal-content .loading {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 16px;
}

#modal-content .loading:after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Responsive Anpassungen für das Modal */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    #modal-content .shipment-details {
        grid-template-columns: 1fr;
    }
    
    #modal-content .status-table {
        display: block;
        overflow-x: auto;
    }
}

/* Responsive-Anpassungen für mobile Geräte */
@media screen and (max-width: 768px) {
    #hmp-status-history,
    #hmp-results-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        box-shadow: none;
        border: 1px solid #eaeaea;
    }
    
    #hmp-status-history th,
    #hmp-results-table th,
    #hmp-status-history td,
    #hmp-results-table td {
        white-space: nowrap;
    }
    
    .view-details-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Leere Tabelle Styling */
#hmp-status-history tr:only-child td,
#hmp-results-table tr:only-child td {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #777;
}

/* Improved Pagination Styling */
.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 15px 0;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Previous (Back) button - positioned left */
.pagination .prev-page {
    margin-right: auto;
}

/* Next button - positioned right */
.pagination .next-page {
    margin-left: auto;
}

/* Container for page numbers in the middle */
.pagination .page-numbers-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Style for all pagination links */
.pagination a {
    display: block;
    padding: 6px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 3px;
    color: #0073aa;
    background-color: white;
    transition: all 0.2s ease;
    font-size: 13px;
    margin: 0 2px;
}

/* Style for page number links in the middle container */
.pagination .page-numbers-container a,
.pagination .page-numbers-container .current-page,
.pagination .page-numbers-container .ellipsis {
    margin: 0 3px;
}

.pagination .page-numbers-container .ellipsis {
    color: #666;
    padding: 0 2px;
}

.pagination a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Current page indicator */
.pagination .current-page {
    display: block;
    padding: 6px 10px;
    background-color: #0073aa;
    color: white;
    border-radius: 3px;
    border: 1px solid #0073aa;
    font-size: 13px;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .pagination a, .pagination .current-page {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* On very small screens, hide some page numbers to save space */
    .pagination .page-numbers-container a:not(:first-child):not(:last-child) {
        display: none;
    }
    
    /* But keep the current page and important navigation points visible */
    .pagination .page-numbers-container .current-page {
        display: inline-block;
    }
}

/* Empty placeholders when no prev/next button is available */
.pagination .empty {
    width: 70px; /* Approximate width of the navigation buttons */
}

/* Empty placeholders when no prev/next button is available */
.pagination .empty {
    width: 70px; /* Approximate width of the navigation buttons */
}

/* Fehler- und Infomeldungsstile */
.error-message,
.info-message {
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

.error-message {
    background-color: #fff0f0;
    border-left: 4px solid #d63638;
    color: #d63638;
}

.info-message {
    background-color: #f0f7fb;
    border-left: 4px solid #0073aa;
    color: #0073aa;
}

.user-info {
    background-color: #f8f8f8;
    border-left: 4px solid #0073aa;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Verbessertes Styling für die Suchtabs */
.search-tabs {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Tab Navigation */
.search-tabs .ui-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #0073aa;
    position: relative;
    z-index: 1;
}

.search-tabs .ui-tabs-nav li {
    margin: 0 3px 0 0;
}

.search-tabs .ui-tabs-nav a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.search-tabs .ui-tabs-nav a:hover {
    background-color: #eaeaea;
    color: #333;
}

.search-tabs .ui-tabs-active a {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
    position: relative;
}

.search-tabs .ui-tabs-active a:after {
    content: '';
    position: absolute;
    height: 2px;
    background: #0073aa;
    left: 0;
    right: 0;
    bottom: -2px;
}

/* Tab Inhaltsbereiche */
.search-tabs > div {
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Referenzsuche Eingabefeld */
#hmp-tracking-reference-form {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
}

#hmp-tracking-reference {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#hmp-tracking-reference:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

#hmp-tracking-reference-form button {
    border-radius: 0 4px 4px 0;
    padding: 12px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

#hmp-tracking-reference-form button:hover {
    background-color: #005a87;
}

/* Erweiterte Suchfelder */
.search-fields {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
    align-items: flex-end;
}

.field-group {
    padding: 0 10px;
    margin-bottom: 15px;
    flex: 1;
    min-width: 200px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.field-group input[type="text"],
.field-group input.datepicker {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.field-group input[type="text"]:focus,
.field-group input.datepicker:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
    outline: none;
}

.field-group button {
    width: 100%;
    padding: 10px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 23px; /* Ausrichtung mit anderen Feldern */
}

.field-group button:hover {
    background-color: #005a87;
}

/* Datepicker UI Verbesserungen */
.ui-datepicker {
    padding: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

.ui-datepicker .ui-datepicker-header {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 5px;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    filter: brightness(10);
}

.ui-datepicker th {
    color: #555;
    font-weight: 600;
}

.ui-datepicker td a {
    text-align: center;
}

.ui-datepicker td a.ui-state-default {
    background: transparent;
    border: none;
    color: #333;
}

.ui-datepicker td a.ui-state-highlight {
    background: #f7f7f7;
    color: #0073aa;
    border-radius: 3px;
}

.ui-datepicker td a.ui-state-active {
    background: #0073aa;
    color: white;
    border-radius: 3px;
}

/* Responsive Anpassungen */
@media screen and (max-width: 768px) {
    .search-tabs .ui-tabs-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .search-tabs .ui-tabs-nav li {
        margin: 0 0 5px 0;
    }
    
    .search-tabs .ui-tabs-nav a,
    .search-tabs .ui-tabs-active a {
        border-radius: 4px;
        border: 1px solid #ddd;
    }
    
    .search-tabs .ui-tabs-active a {
        border-color: #0073aa;
    }
    
    .search-tabs .ui-tabs-active a:after {
        display: none;
    }
    
    .search-tabs > div {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 15px;
    }
    
    #hmp-tracking-reference-form {
        flex-direction: column;
    }
    
    #hmp-tracking-reference {
        border-radius: 4px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    #hmp-tracking-reference-form button {
        border-radius: 4px;
        width: 100%;
    }
    
    .field-group {
        flex: 1 1 100%;
    }
}

/* Container für Ergebnisse */
#hmp-reference-result,
#hmp-advanced-result {
    margin-top: 30px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #eaeaea;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

#hmp-reference-result h3,
#hmp-advanced-result h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 15px;
}

/* Login-Formular Styling - Verbesserte Version */
.hmp-login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.hmp-login-container h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.hmp-login-container h2:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #0073aa;
    transform: translateX(-50%);
}

.hmp-login-form .form-group {
    margin-bottom: 20px;
}

.hmp-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.hmp-login-form input[type="text"],
.hmp-login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #f9f9f9;
}

.hmp-login-form input[type="text"]:focus,
.hmp-login-form input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
    background-color: #fff;
}

.hmp-login-form button {
    width: 100%;
    padding: 14px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hmp-login-form button:hover {
    background-color: #005a87;
}

.hmp-login-form button:active {
    background-color: #004b70;
    transform: translateY(1px);
}

.hmp-login-error {
    background-color: #fff0f0;
    color: #d63638;
    padding: 12px 15px;
    border-left: 4px solid #d63638;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
}

.hmp-login-info {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsives Design für mobile Geräte */
@media (max-width: 480px) {
    .hmp-login-container {
        width: 90%;
        margin: 20px auto;
        padding: 20px;
    }
}

/* Optional: Branding-Element oben auf dem Formular */
.hmp-login-branding {
    text-align: center;
    margin-bottom: 20px;
}

.hmp-login-branding img {
    max-height: 60px;
    margin-bottom: 10px;
}

/* POD Viewer Button Styling */
.view-pod-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.view-pod-btn:hover {
    background-color: #005a87;
}

.pod-icon {
    margin-right: 4px;
    font-size: 14px;
}

/* Make sure our modal supports the POD viewing */
#hmp-shipment-modal .status-table td {
    vertical-align: middle;
}

/* Styles for showing which users you can see shipments from */
.visible-users {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Highlight rows from other users */
.other-user-shipment {
    background-color: #f0f7fb !important;
}

.other-user-shipment:hover td {
    background-color: #e0eef7 !important;
}

/* Highlight other user's sender name */
.other-user-highlight {
    color: #0073aa;
    font-weight: bold;
}

/* Update the user info section for better display of multiple users */
.user-info {
    background-color: #f8f8f8;
    border-left: 4px solid #0073aa;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.logout-link {
    display: block;
    margin-top: 10px;
    text-align: right;
}

/* Add a column for the sender in the results table */
#hmp-results-table th:nth-child(4),
#hmp-results-table td:nth-child(4) {
    min-width: 120px;
}

@media screen and (max-width: 768px) {
    .user-info {
        padding: 10px;
    }
    
    .visible-users {
        margin-top: 8px;
    }
    
    .logout-link {
        margin-top: 8px;
        text-align: left;
    }
}