/* Container & Card */
.vtp-tracking-container {
    width: 100%;
    max-width: 650px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.vtp-tracking-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 35px 30px;
    text-align: center;
    box-sizing: border-box;
}

/* Title */
.vtp-tracking-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Form & Inputs */
.vtp-tracking-form {
    margin-bottom: 20px;
}

.vtp-input-group {
    margin-bottom: 20px;
}

.vtp-input-group input[type="text"] {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 15px;
    color: #606266;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
    text-align: center;
}

.vtp-input-group input[type="text"]:focus {
    border-color: #f0a020;
    box-shadow: 0 0 8px rgba(240, 160, 32, 0.2);
}

/* Submit Button */
.vtp-submit-btn {
    width: 100%;
    background-color: #f09e20;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(240, 158, 32, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vtp-submit-btn:hover {
    background-color: #e08c10;
    box-shadow: 0 6px 12px rgba(224, 140, 16, 0.3);
    transform: translateY(-1px);
}

.vtp-submit-btn:active {
    transform: translateY(0);
}

/* Inline Loading / Error Notice */
#vtp-tracking-result {
    margin-top: 20px;
    text-align: left;
}

.vtp-error-message {
    color: #f56c6c;
    background-color: #fef0f0;
    border: 1px solid #fde2e2;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 0;
}

.vtp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    color: #909399;
}

.vtp-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f09e20;
    border-radius: 50%;
    animation: vtp-spin 1s linear infinite;
}

@keyframes vtp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   POPUP MODAL (TƯƠNG THÍCH FLATSOME)
   ========================================================================== */

.vtp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
}

.vtp-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.vtp-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Fix scrollbar freeze */
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.vtp-modal-overlay.open .vtp-modal-box {
    transform: scale(1);
}

.vtp-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #ececec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.vtp-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #f09e20;
    margin: 0;
    letter-spacing: 0.5px;
}

.vtp-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
    font-weight: 300;
    margin: 0;
    min-height: auto;
}

.vtp-modal-close:hover {
    color: #e53e3e;
    transform: scale(1.1);
}

.vtp-modal-body {
    padding: 20px 24px;
    box-sizing: border-box;
    overflow-y: auto; /* Handle scrolling inside body only */
    flex: 1;
}

/* Banner trạng thái đơn hàng */
.vtp-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    box-sizing: border-box;
}

.vtp-status-banner.status-success {
    background-color: #e6fffa;
    border: 1px solid #b2f5ea;
    color: #00875a;
}

.vtp-status-banner.status-pending {
    background-color: #fffaf0;
    border: 1px solid #feebc8;
    color: #c05621;
}

.vtp-status-banner.status-failed {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.vtp-status-icon {
    font-size: 20px;
}

.vtp-status-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.vtp-status-label {
    font-weight: 600;
}

.vtp-status-value {
    font-weight: 700;
    text-transform: uppercase;
}

.vtp-status-date {
    font-size: 12.5px;
    opacity: 0.85;
}

/* ==========================================================================
   CẤU TRÚC PHẦN (COMPACT SECTIONS)
   ========================================================================== */

.vtp-compact-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vtp-section-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 18px;
    box-sizing: border-box;
}

.vtp-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    margin: 0 0 12px 0;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vtp-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    box-sizing: border-box;
}

.vtp-grid-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px dashed #edf2f7;
    font-size: 13px;
    line-height: 1.4;
}

.vtp-grid-item.full-width {
    grid-column: span 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.vtp-grid-label {
    color: #718096;
    font-weight: 500;
    min-width: 110px;
}

.vtp-grid-val {
    font-weight: 600;
    color: #2d3748;
    text-align: right;
    max-width: 65%;
    word-break: break-word;
}

.vtp-grid-item.full-width .vtp-grid-val {
    max-width: 100%;
}

.text-left {
    text-align: left !important;
}

/* Helpers */
.text-primary {
    color: #f09e20 !important;
}

.text-danger {
    color: #e53e3e !important;
}

@media (max-width: 600px) {
    .vtp-details-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .vtp-grid-item.full-width {
        grid-column: span 1;
    }
    
    .vtp-grid-val {
        max-width: 55%;
    }
}

/* Khóa cuộn trang web nền khi mở modal */
html.vtp-no-scroll,
body.vtp-no-scroll {
    overflow: hidden !important;
    height: 100% !important;
}

