/* Local Font Face: Prompt */
@font-face {
    font-family: 'Prompt';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: local('Prompt Light'), local('Prompt-Light'), url('../template/font/Prompt/Prompt-Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Prompt';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Prompt Regular'), local('Prompt-Regular'), url('../template/font/Prompt/Prompt-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Prompt';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local('Prompt SemiBold'), local('Prompt-SemiBold'), url('../template/font/Prompt/Prompt-SemiBold.ttf') format('truetype');
}

body{
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #618d4d 0%, #d9ead3 100%); /* พื้นหลังไล่เฉดสีนุ่มนวล */
    min-height: 100vh;
    color: #333;
}
.main-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 50px;
    margin-top: 60px;
    margin-bottom: 60px;
    border: none;
}
@media (max-width: 767px) {
    .main-card {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
}
.header-logo {
    margin-bottom: 30px;
}
.header-logo img {
    max-height: 60px;
    width: auto;
}
.tracking-title {
    font-weight: 600;
    font-size: 32px;
    color: #618d4d;
    margin-bottom: 40px;
    text-align: center;
}
@media (max-width: 767px) {
    .tracking-title { font-size: 24px; margin-bottom: 25px; }
}
.search-wrapper {
    background: #f4fff0;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 45px;
}
@media (max-width: 767px) {
    .search-wrapper { padding: 20px; margin-bottom: 25px; }
}
.search-box {
    border: 1px solid #daced2;
    height: 60px;
    font-size: 16px;
    box-shadow: none !important;
    padding-left: 20px;
    transition: all 0.3s ease;
}

/* ปรับให้ช่อง Tax ID โค้งมนทุกด้าน */
#tax_id.search-box {
    border-radius: 12px !important;
}

/* ปรับให้ช่อง Tracking โค้งมนทุกด้าน */
#search_input.search-box {
    border-radius: 12px !important;
}

.search-box:focus {
    border-color: #48b300;
    box-shadow: 0 0 0 0.2rem rgba(95, 179, 0, 0.15) !important;
}

/* Styling for the search button */
.btn-track {
    background: linear-gradient(135deg, #618d4d 0%, #42b300 100%);
    color: white;
    border: none;
    border-radius: 12px !important; /* Fully rounded */
    height: 60px;
    padding: 0 40px; /* Adjusted padding */
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
    display: inline-flex; /* Use flexbox for centering content */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
}

/* ส่วนควบคุมการจัดวางปุ่ม */
.button-wrapper {
    text-align: right; /* ชิดขวาในหน้าจอปกติ */
}

@media (max-width: 767px) {
    .search-wrapper .col-md-4 {
        margin-bottom: 15px; /* Add margin between inputs on small screens */
    }
    .button-wrapper {
        text-align: center; /* จัดกึ่งกลางในหน้าจอมือถือ */
    }
    .btn-track {
        width: 100%; /* Full width button on small screens */
        padding: 0 20px;
        font-size: 16px; /* Slightly larger font for mobile button */
        border-radius: 12px !important;
    }
}
.btn-track:hover {
    background: #48b300;
    transform: translateY(-2px);
}
.help-text {
    font-size: 14px;
    color: #414141;
    margin-top: 20px;
    line-height: 1.6;
    border-left: 4px solid #d9534f;
    padding-left: 15px;
}
.info-label {
    font-weight: 600;
    margin-top: 20px;
    color: #777;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}
.status-table {
    margin-top: 50px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}
.status-table th {
    border: none !important;
    padding-bottom: 15px;
    color: #618d4d;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
}
.status-table th, .status-table td {
    white-space: nowrap;
}
.status-table td {
    padding: 20px 15px;
    vertical-align: middle;
    background: #fdfdfd;
    border-top: 1px solid #eee !important;
    border-bottom: 1px solid #eee !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.status-table tr td:first-child {
    border-left: 1px solid #eee !important;
    border-radius: 10px 0 0 10px;
}
.status-table tr td:last-child {
    border-right: 1px solid #eee !important;
    border-radius: 0 10px 10px 0;
}

/* Status Dots */
.dot {
    height: 14px;
    width: 14px;
    background-color: #ddd;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    vertical-align: middle;
}
.dot-success { background-color: #28a745 !important; box-shadow: 0 0 0 1px #28a745 !important; }
.dot-warning { background-color: #f0ad4e !important; box-shadow: 0 0 0 1px #f0ad4e !important; }
.dot-danger  { background-color: #d9534f !important; box-shadow: 0 0 0 1px #d9534f !important; }

.text-responsible {
    color: #6fd94f;
    font-weight: 600;
}

/* Vertical Timeline Styles */
.timeline-container {
    margin-top: 40px;
    padding: 0 15px;
}
.timeline-item {
    display: flex;
    gap: 25px;
    min-height: 100px;
}
.timeline-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
    flex-shrink: 0;
}
.timeline-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #ddd; /* ทำให้เส้นวงกลมหนาขึ้น */
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 5px #fff; /* ปรับ shadow ให้เข้ากับ border ที่หนาขึ้น */
}
.timeline-circle i {
    -webkit-text-stroke: 0;
    font-weight: normal;
}
.timeline-line {
    position: absolute;
    top: 40px;
    bottom: 0;
    width: 0; /* ปรับความกว้างเป็น 0 เพื่อใช้ border แทน */
    border-left: 3px dashed #ddd; /* เปลี่ยนเป็นเส้นประสีเทาสำหรับสถานะที่ยังไม่เกิดขึ้น */
    z-index: 1;
}
.timeline-item:last-child .timeline-line {
    display: none;
}
.timeline-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: start;
    padding-top: 5px;
    padding-bottom: 40px;
}
.circle-success { border-color: #28a745; color: #28a745; box-shadow: 0 0 10px rgba(40, 167, 69, 0.2), 0 0 0 5px #fff; } /* ปรับ shadow ให้เข้ากับ border ที่หนาขึ้น */
.circle-warning { border-color: #f0ad4e; color: #f0ad4e; box-shadow: 0 0 10px rgba(240, 173, 78, 0.2), 0 0 0 5px #fff; } /* ปรับ shadow ให้เข้ากับ border ที่หนาขึ้น */
.circle-muted { border-color: #eee; color: #ccc; box-shadow: 0 0 0 5px #fff; } /* ปรับ shadow ให้เข้ากับ border ที่หนาขึ้น */
.line-success { background: #28a745; width: 3px; border-left: none; } /* เมื่อสำเร็จแล้วให้กลับมาเป็นเส้นทึบสีเขียว */
.line-warning { background: #f0ad4e; width: 3px; border-left: none; } /* เส้นทึบสีส้มสำหรับกรณีสำเร็จแต่ไม่ครบ */

/* Horizontal Status Stepper */
.status-stepper {
    display: flex;
    justify-content: center; /* เปลี่ยนเป็นจัดกึ่งกลางเพื่อให้ไอคอนเกาะกลุ่มกันดูดีกว่า */
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
    padding: 0 10px;
    flex-wrap: nowrap;
    overflow-x: auto; /* รองรับกรณีหน้าจอแคบให้เลื่อนได้ */
    -webkit-overflow-scrolling: touch;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px; /* กำหนดความกว้างคงที่เพื่อให้ไอคอนอยู่ห่างกันในระยะที่พอดี */
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22.5px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #eee;
    z-index: -1;
    transition: all 0.3s ease;
}
.step-item.active:not(:last-child)::after { background: #28a745; }
.step-item.warning:not(:last-child)::after { background: #f0ad4e; }
.step-item.danger:not(:last-child)::after { background: #d9534f; }

.step-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ccc;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px #fff;
}
.step-item.active .step-icon { border-color: #28a745; color: #28a745; }
.step-item.warning .step-icon { border-color: #f0ad4e; color: #f0ad4e; }
.step-item.danger .step-icon { border-color: #d9534f; color: #d9534f; }
.step-label {
    font-size: 10px;
    text-align: center;
    color: #777;
    font-weight: 500;
    max-width: 80px;
}
.step-doc-code {
    display: inline-block;
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    color: #777;
    word-break: break-word;
}
.step-delivery-date {
    display: inline-block;
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    color: #dc3545;
    word-break: break-word;
}
.status-delivery-date {
    display: inline-block;
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    color: #dc3545;
    word-break: break-word;
}
