/*
 * apex-tracker.css
 * Styled to match the dark, modern tracking form image.
 */

/* =========================================================================
 * WIDGET CONTAINER & GLOBAL STYLES
 * ========================================================================= */

.apex-tracker-widget {
    /* Base Container Styling */
    max-width: 640px;
    margin: 0 auto;
    padding: 40px; /* Increased padding */
    border-radius: 12px;
    color: #fff; /* Default text color is white/light for the dark background */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Soft shadow for depth */

    /* Background (Simulated from image - adjust as necessary) */
    background-color: rgba(0, 0, 0, 0.85); /* Dark background with slight transparency */
    /* IMPORTANT: Replace the placeholder below with the actual URL to your background image. */
    /* background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9)), url('path/to/your/van-background.jpg'); */
    position: relative;
    overflow: hidden; 
    font-family: 'Open Sans', Arial, sans-serif;
}

/* =========================================================================
 * HEADER (Icon & Title)
 * ========================================================================= */

.apx-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.apx-search-icon {
    width: 50px;
    height: 50px;
    background-color: #c21b22; /* Prominent Red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; 
    flex-shrink: 0;
}

.apx-header h1 {
    font-size: 2.5rem; /* Large, bold title */
    font-weight: 900;
    color: #f7f7f7;
    margin: 0;
    line-height: 1.2;
}

.apx-subtitle {
    font-size: 1.15rem;
    color: #cccccc;
    margin-top: 0;
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 90%;
}

/* =========================================================================
 * FORM & INPUT
 * ========================================================================= */

#apex-track-form {
    margin-bottom: 30px;
}

.apx-input-wrap {
    margin-bottom: 20px;
}

#apex-awb {
    width: 100%;
    padding: 18px 20px; /* Large input field */
    font-size: 1.1rem;
    color: #f7f7f7;
    background-color: rgba(255, 255, 255, 0.1); /* Transparent/darker background */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light border for visibility */
    border-radius: 8px;
    transition: border-color 0.3s;
    box-sizing: border-box; /* Ensures padding is included in the width */
}

#apex-awb::placeholder {
    color: #888;
}

#apex-awb:focus {
    outline: none;
    border-color: #c21b22; /* Red focus border */
    box-shadow: 0 0 0 1px #c21b22;
}

/* =========================================================================
 * BUTTON
 * ========================================================================= */

.apx-btn {
    width: 100%;
    padding: 16px 20px;
    background-color: #c21b22; /* Primary Red */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.apx-btn:hover {
    background-color: #a3171c; /* Slightly darker red on hover */
}

.apx-arrow {
    margin-left: 10px;
    font-size: 1.5rem;
    line-height: 1;
}

/* =========================================================================
 * FOOTER & SUPPORT LINK
 * ========================================================================= */

.apx-footer {
    padding-top: 25px;
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    font-size: 0.95rem;
    color: #ccc;
    text-align: right; 
}

.apx-support-link {
    color: #c21b22; /* Red link color */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.apx-support-link:hover {
    color: #ff454d;
    text-decoration: underline;
}


/* =========================================================================
 * RESULT/STATUS STYLES (Adjusted for dark theme)
 * ========================================================================= */

#apex-track-result {
    margin-top: 20px;
}

.apx-loading, .apx-error, .apx-notice {
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
}

.apx-loading {
    color: #c21b22;
    background: rgba(194, 27, 34, 0.1); /* Light red background */
}

.apx-error {
    color: #ff4d4d; /* Brighter red for errors */
    background: rgba(255, 77, 77, 0.1);
}

.apx-notice {
    color: #cccccc;
    background: rgba(255, 255, 255, 0.05);
}

/* TRACKING CARD */
.apx-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.apx-head {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f7f7f7;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.apx-line {
    margin-top: 8px;
    font-size: 1rem;
    color: #ccc;
}

.apx-line strong {
    color: #f7f7f7;
}

/* TIMELINE */
.apx-timeline {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.apx-tl-head {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c21b22; 
    margin-bottom: 10px;
}

.apx-tl-item {
    padding: 10px 0;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
    position: relative;
    font-size: 0.95rem;
    color: #ccc;
}

.apx-tl-item:not(:last-child) {
    margin-bottom: 8px;
}

.apx-tl-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 13px;
    width: 10px;
    height: 10px;
    background: #c21b22;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.5);
}

.apx-tl-time {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.apx-tl-status {
    color: #f7f7f7;
}

.apx-tl-note {
    font-style: italic;
    font-size: 0.9rem;
    color: #888;
    margin-top: 4px;
}

/* ACTIONS (Link to full tracking) */
.apx-actions {
    margin-top: 15px;
    text-align: right;
}

.apx-link {
    color: #c21b22;
    text-decoration: none;
    font-size: 0.95rem;
}

.apx-link:hover {
    text-decoration: underline;
}

/* Media Query for smaller screens */
@media (max-width: 600px) {
    .apex-tracker-widget {
        padding: 20px 25px;
        border-radius: 0;
    }
    .apx-header h1 {
        font-size: 2rem;
    }
    .apx-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }
}