/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

/* Main Tracking Container */
.darb-assabil-tracking-box {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tracking-container {
    width: 97%;
    max-width: 36rem;
    overflow: hidden;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    margin: 0 auto;
}
/* Form Elements */
.darb-assabil-tracking-form {
    margin-bottom: 25px;
}

.darb-assabil-tracking-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.darb-assabil-tracking-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    /* background-color: #fff; */
    /* color: #333; */
}

.darb-assabil-tracking-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.darb-assabil-tracking-btn {
    padding: 12px 25px;
    /* background-color: #2271b1; */
    /* color: white; */
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.darb-assabil-tracking-btn:hover {
    background-color: #1a5a8a;
}

.darb-assabil-tracking-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Title */
.darb-assabil-tracking-title {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

/* Tracking Result Container */
.darb-assabil-tracking-result {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    background: rgba(255,255,255,0.5);
    padding: 0.5rem 0.75rem;
    backdrop-filter: blur(4px);
}

.header h3 {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 500;
}

.close-btn {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    height: 2.5rem;
    padding: 0;
    outline: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.close-btn:hover {
    background-color: transparent;
}

.content {
    max-height: 500px;
    overflow: auto;
    padding: 0 0.75rem;
}

.timeline {
    width: 100%;
    padding-top: 0.75rem;
    position: relative;
}

.timeline-item {
    padding-bottom: 1.25rem;
    position: relative;
}

.timeline-line {
    position: absolute;
    height: 100%;
    width: 2px;
    background-color: #ebebeb;
    left: 14px;
}

.timeline-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.avatar-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.avatar {
    position: relative;
    height: 32px;
    width: 32px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 9999px;
    background-color: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials {
    color: #05128A;
    font-size: 14px;
    font-weight: bold;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
    display: block;
}

.timeline-details h3 {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0 0.375rem;
    text-transform: capitalize;
}

.status-info {
    color: #d97706;
    background-color: rgba(251, 191, 36, 0.2);
    border-color: transparent;
}

.status-delayed,
.status-assigned,
.status-referenced,
.status-booked {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: transparent;
}

.status-accepted {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.2);
    border-color: transparent;
}

.timeline-time {
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 400;
    color: #6b7280;
}

.timeline-message {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 400;
}

.timeline-remarks {
    font-size: 0.875rem;
}

.branch-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.125rem 0.625rem;
    gap: 0.5rem;
    background-color: #ebebeb;
    border-color: transparent;
    cursor: pointer;
}

.branch-badge:hover {
    background-color: #ebebeb;
}

.branch-avatar {
    height: 28px;
    width: 28px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 9999px;
    background-color: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-avatar-initials {
    color: #973562;
    font-size: 12px;
    font-weight: bold;
}

.modified-items {
    margin-top: 0.5rem;
}

.modified-label {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.modified-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.125rem 0.625rem;
    color: inherit;
    text-transform: capitalize;
}

.show-less-btn {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    cursor: pointer;
    margin-bottom: 1rem;
}

.show-less-btn:hover {
    background-color: #f3f4f6;
}

.footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    background: inherit;
    padding: 0.75rem 0;
}

/* Utility classes for flex/gap/pt */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.pt-2 { padding-top: 0.5rem; }

/* Responsive Adjustments */
@media (max-width: 480px) {
    .timeline-content {
        flex-direction: column;
        align-items: stretch;
    }
    .avatar-container {
        flex-direction: row;
        width: auto;
        margin-bottom: 0;
        margin-top: 0;
    }
}