/*
 * Track order page styles
 * -----------------------
 * These rules mirror the existing public layout so that the header
 * and navigation look identical to the rest of the storefront while
 * adding bespoke styling for the tracking form and results area.
 */

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

html, body {
    /* Allow the main tracker section to grow so the footer sticks to the bottom */
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    line-height: 1.6;
    color: #2d3436;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header-offset {
    height: var(--header-height);
}

/* Tracker layout */
main {
    /* Grow the main element so empty states still push the footer down */
    flex: 1 0 auto;
}

.tracker-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px 60px;
}

.tracker-card {
    background: white;
    padding: 36px;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    max-width: 640px;
    margin: 0 auto;
}

.tracker-card h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.tracker-card p {
    color: #636e72;
    margin-bottom: 30px;
}

/* Form styling */
.tracker-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 30px;
}

.tracker-form label {
    grid-column: 1 / -1;
    font-weight: 600;
    color: #2d3436;
}

.tracker-input {
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid #dfe6e9;
    font-size: 16px;
    min-height: 48px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.tracker-input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.tracker-button {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tracker-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(0, 188, 212, 0.3);
}

.tracker-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Status display styling */
.status-panel {
    border-radius: 18px;
    border: 1px solid #dfe6e9;
    padding: 30px;
    background: #f9fbfd;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pill[data-status="pending"] {
    background: rgba(253, 203, 110, 0.15);
    color: #e17055;
}

.status-pill[data-status="approved"] {
    background: rgba(85, 239, 196, 0.2);
    color: #00b894;
}

.status-pill[data-status="completed"] {
    background: rgba(9, 132, 227, 0.15);
    color: #0984e3;
}

.status-pill[data-status="disapproved"],
.status-pill[data-status="cancelled"],
.status-pill[data-status="canceled"] {
    background: rgba(214, 48, 49, 0.15);
    color: #d63031;
}

.status-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.status-detail {
    background: white;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.04);
}

.status-detail span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #95a5a6;
    margin-bottom: 6px;
}

.status-detail strong {
    font-size: 16px;
    color: #2d3436;
}

/* Messaging */
.feedback-message {
    padding: 20px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.03);
    color: #2d3436;
}

.feedback-message.error {
    background: rgba(214, 48, 49, 0.15);
    color: #d63031;
}

.feedback-message.success {
    background: rgba(85, 239, 196, 0.2);
    color: #009688;
}


@media (max-width: 768px) {
    .tracker-wrapper {
        margin: 28px auto;
        padding: 0 16px 40px;
    }

    .tracker-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .tracker-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tracker-button {
        width: 100%;
    }

    .status-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tracker-wrapper {
        margin: 24px auto;
        padding: 0 14px 32px;
    }

    .tracker-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .tracker-card h1 {
        font-size: 26px;
    }

    .tracker-input {
        font-size: 15px;
        min-height: 46px;
        padding: 11px 16px;
        border-radius: 12px;
    }

    .tracker-button {
        padding: 12px 20px;
        border-radius: 12px;
        font-size: 15px;
    }
}
