/* =========================================================
   TRACK ORDER PAGE STYLES (Matching Screenshot Ref)
   ========================================================= */

body {
    background-color: #f0f6ff;
    color: #1e293b;
    padding-top: 135px;
}


.track-main-content {
    position: relative;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 5rem;
}

.track-page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2d5a;
    margin-bottom: 1.5rem;
}

/* Layout Grid */
.track-main-grid {
    display: grid;
    grid-template-columns: 63% 34%;
    gap: 3%;
    align-items: start;
}

/* Card Base */
.track-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.03);
}





.return-stage-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem;
}

.return-progress-stage {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.stage-label-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e3a8a;
    background-color: #dbeafe;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 0.45rem;
}

.stage-label-tag.admin-tag {
    color: #0f766e;
    background-color: #ccfbf1;
}

.return-progress-note {
    font-size: 0.825rem;
    color: #334155;
    margin-bottom: 1rem;
    line-height: 1.45;
}





/* ================= 1. Search Order Card ================= */
.search-order-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
}

.search-card-illustration {
    width: 80px;
    height: 80px;
    background-color: #f0f7ff;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-illus-icon {
    font-size: 2.2rem;
    color: #3b82f6;
}

.search-card-form {
    flex: 1;
}

.search-card-label {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #1f2d5a;
    margin-bottom: 0.4rem;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.search-order-input {
    flex: 1;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    outline: none;
    color: #1e293b;
    transition: border-color 0.2s;
}

.search-order-input:focus {
    border-color: #1f2d5a;
}

.btn-track-submit {
    height: 42px;
    padding: 0 2.25rem;
    background-color: #242d54;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-track-submit:hover {
    background-color: #1d2545;
}

.search-hint {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ================= 2. Timeline Card ================= */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
}

.order-id-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2d5a;
}

.ordered-on-text {
    font-size: 0.8rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.25rem;
}

.status-badge-group {
    text-align: right;
}

/* Soft Purple Pill Matching Image */
.status-pill-badge {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.775rem;
    text-align: center;
}

.status-pill-badge.order-confirmed {
    background-color: #fae8ff;
    color: #d946ef;
    border: 1px solid #f5d0fe;
}

.estimated-delivery-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.estimated-delivery-text strong {
    color: #64748b;
    display: block;
}

/* Progress Bar & Nodes */
.tracking-progress-wrapper {
    position: relative;
    padding: 0.5rem 0 1rem 0;
}

.progress-line-bg {
    position: absolute;
    top: 24px;
    left: 8%;
    width: 84%;
    height: 2px;
    background-color: #cbd5e1;
    z-index: 1;
}

.progress-line-fill {
    height: 100%;
    background-color: #242d54;
    transition: width 0.3s ease;
}

.progress-steps-row {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 22%;
}

.point-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #8e9198; /* Inactive grey node */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.step-point.completed .point-circle {
    background-color: #242d54; /* Active Dark Slate */
}

.point-label {
    font-size: 0.775rem;
    font-weight: 700;
    color: #1f2d5a;
}

.point-date {
    font-size: 0.725rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* ================= 3. Need Help Gradient Banner ================= */
.help-banner-card {
    background: linear-gradient(135deg, #0250be 0%, #1d4ed8 45%, #e0f2fe 100%);
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
}

.help-banner-content {
    max-width: 60%;
    z-index: 2;
}

.help-banner-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.help-banner-content p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
}

.btn-contact-us {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.75rem;
    background-color: #ffffff;
    border-radius: 9999px;
    color: #1f2d5a;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.btn-contact-us:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
}

.help-illustration-wrapper {
    position: absolute;
    right: 1.5rem;
    bottom: -10px;
    width: 350px;
    z-index: 1;
}

.cs-agent-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ================= RIGHT COLUMN: Sidebar ================= */
.order-summary-sidebar {
    padding: 1.5rem;
}

.summary-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.summary-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2d5a;
}

.summary-order-code {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.summary-section {
    margin-bottom: 1.25rem;
}

.section-subheading {
    font-size: 0.875rem;
    font-weight: 800;
    color: #1f2d5a;
    margin-bottom: 0.35rem;
}

.address-text-block strong {
    font-size: 0.85rem;
    color: #1f2d5a;
}

.address-text-block p {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 0.1rem;
}

.incoterm-text {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 600;
}

.items-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.items-count {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Items List Stack */
.summary-items-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.summary-item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-item-card img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #ffffff;
    padding: 0.2rem;
    flex-shrink: 0;
}

.item-meta {
    flex: 1;
}

.item-meta h5 {
    font-size: 0.775rem;
    font-weight: 700;
    color: #1f2d5a;
    line-height: 1.3;
}

.item-price-qty {
    text-align: right;
    white-space: nowrap;
}

.qty-text {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
}

.price-text {
    font-size: 0.825rem;
    font-weight: 800;
    color: #1f2d5a;
}

/* Footer Total */
.summary-total-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2d5a;
}

.grand-total-amount {
    font-size: 1.15rem;
    color: #1f2d5a;
}




/* =========================================================
   RETURN REQUEST CARD & POPUP MODAL STYLES
   ========================================================= */

.return-card-header {
    margin-bottom: 1rem;
}

.return-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2d5a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.return-status-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.return-status-box p {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
}

.status-pill-badge.no-return {
    background-color: #e2e8f0;
    color: #475569;
}

.status-pill-badge.return-approved {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.btn-return-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background-color: #242d54;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-return-action:hover {
    background-color: #1d2545;
}

.timeline-subheading {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2d5a;
    margin-bottom: 0.75rem;
}

/* Modal Backdrop Overlay */
.return-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.return-modal-backdrop.open {
    display: flex;
}

/* Modal Card Box */
.return-modal-card {
    background-color: #ffffff;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: scale(0.9) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.return-modal-header {
    background-color: #1f2d5a;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.return-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

.btn-close-modal:hover {
    opacity: 1;
}

.return-modal-body {
    padding: 1.5rem;
    max-height: 65vh;
    overflow-y: auto;
}

.modal-form-group {
    margin-bottom: 1.1rem;
}

.modal-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2d5a;
    margin-bottom: 0.35rem;
}

.policy-scroll-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.75rem 0.85rem;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.45;
}

.modal-select,
.modal-textarea,
.modal-file-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: #1e293b;
    outline: none;
}

.modal-select:focus,
.modal-textarea:focus {
    border-color: #1f2d5a;
}

.modal-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.modal-checkbox-row input[type="checkbox"] {
    margin-top: 0.15rem;
    accent-color: #1f2d5a;
}

.modal-checkbox-label {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 600;
}

.error-msg {
    display: none;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.return-modal-footer {
    padding: 1rem 1.5rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-modal-cancel {
    padding: 0.55rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    color: #475569;
    font-weight: 700;
    font-size: 0.825rem;
    cursor: pointer;
}

.btn-modal-submit {
    padding: 0.55rem 1.5rem;
    background-color: #1f2d5a;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.825rem;
    cursor: pointer;
}

.btn-modal-submit:hover {
    background-color: #1d2545;
}


/* Responsive Scaling */
@media screen and (max-width: 900px) {
    .track-main-grid {
        grid-template-columns: 1fr;
    }
    .search-order-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .help-banner-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .help-banner-content {
        max-width: 100%;
    }
    .help-illustration-wrapper {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 1rem;
    }
}



/* =========================================================
   COMPREHENSIVE RESPONSIVE MEDIA QUERIES FOR TRACK ORDER PAGE
   (1200px, 1024px, 768px, 640px, 480px, 430px, 425px, 390px, 375px, 320px, 270px)
   ========================================================= */

@media screen and (max-width: 1200px) {
    .track-page-container {
        padding: 0 1.5rem;
    }
}

@media screen and (max-width: 1024px) {
    .track-page-container {
        padding: 0 1.25rem;
    }
    .track-main-grid {
        grid-template-columns: 60% 38%;
        gap: 2%;
    }
}

/* Tablet & Mobile Breakpoint (900px and below) - Single Column Stack */
@media screen and (max-width: 900px) {
    .track-main-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .track-left-column {
        order: 1 !important;
    }

    .track-right-column {
        order: 2 !important;
    }

    .search-order-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .help-banner-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.75rem;
    }

    .help-banner-content {
        max-width: 100%;
    }

    .help-illustration-wrapper {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .cs-agent-img {
        max-width: 220px;
    }
}

@media screen and (max-width: 768px) {
    .track-page-container {
        padding: 0 1rem;
    }
    
    .track-card {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .timeline-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .status-badge-group {
        text-align: left;
    }
}

@media screen and (max-width: 640px) {
    .search-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-track-submit {
        width: 100%;
        border-radius: 9999px;
    }

    .return-status-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 480px, 430px, & 425px Mobile Viewports */
@media screen and (max-width: 480px), screen and (max-width: 430px), screen and (max-width: 425px) {
    .track-page-container {
        padding: 0 0.5rem;
    }

    .page-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .track-card {
        padding: 1rem;
        border-radius: 0.85rem;
    }

    .search-card-illustration {
        width: 60px;
        height: 60px;
    }

    .search-illus-icon {
        font-size: 1.6rem;
    }

    .order-id-title {
        font-size: 1rem;
    }

    .point-circle {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .point-label {
        font-size: 0.7rem;
    }

    .point-date {
        font-size: 0.65rem;
    }
}

/* 390px & 375px Standard iPhone Screens */
@media screen and (max-width: 390px), screen and (max-width: 375px) {
    .track-page-container {
        padding: 0 0.5rem;
    }

    .summary-item-card img {
        width: 45px;
        height: 45px;
    }

    .item-meta h5 {
        font-size: 0.725rem;
    }

    .price-text {
        font-size: 0.775rem;
    }

    .help-banner-card h3 {
        font-size: 1.25rem;
    }
}

/* 320px Compact Mobile Devices */
@media screen and (max-width: 320px) {
    body {
        font-size: 12px;
    }

    .track-card {
        padding: 0.75rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .point-label {
        display: none; /* Hide timeline sub-labels on ultra-small screens to avoid clutter */
    }
}

/* 270px Ultra-Small Viewports */
@media screen and (max-width: 270px) {
    .track-page-container {
        padding: 0 0.25rem;
    }

    .track-card {
        padding: 0.5rem;
    }

    .search-order-input,
    .btn-track-submit {
        height: 36px;
        font-size: 0.75rem;
    }
}




main{
    padding-top: 3rem;
}

