/* =========================================================
   Fonts
   ========================================================= */

@font-face {
    font-family: 'AkkoProLight';
    src: url('/font/akkopro-light.eot');
    src: url('/font/akkopro-light.eot?#iefix') format('embedded-opentype'), url('/font/akkopro-light.woff') format('woff'), url('/font/akkopro-light.ttf') format('truetype'), url('/font/akkopro-light.svg#AkkoProLight') format('svg');
}

@font-face {
    font-family: 'AkkoProRegular';
    src: url('/font/akkopro-regular.eot');
    src: url('/font/akkopro-regular.eot?#iefix') format('embedded-opentype'), url('/font/akkopro-regular.woff') format('woff'), url('/font/akkopro-regular.ttf') format('truetype'), url('/font/akkopro-regular.svg#AkkoProRegular') format('svg');
}

/* =========================================================
   Base styles
   ========================================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    background: #f3f5fb;
    color: #0b1c33;
    font-family: 'AkkoProRegular', 'CalibriRegular', Arial, sans-serif;
    line-height: 1.6;
}

body.app-body {
    background: #f3f5fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: #0061a8;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    z-index: 1050;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: 12px;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Focus styles */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: none;
}

.btn:focus-visible,
.navbar-toggler:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible,
.btn-submit:focus-visible,
.manage-nav-link:focus-visible,
.app-nav-link:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

/* =========================================================
   App shell – portal theme to match survey styling
   ========================================================= */

.app-header {
    background: #0b1c33;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.brand-bar {
    background: linear-gradient(135deg, #0b1c33, #0c4f83 65%, #0061a8);
    border-bottom: 3px solid #52c3eb;
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: 160px;
    max-width: 100%;
}

.brand-tagline {
    font-family: 'AkkoProLight', 'Calibri', Arial, sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.app-nav {
    background: #ffffff;
    border-bottom: 1px solid #dbe3f0;
}

.app-nav-link {
    color: #0b1c33;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover {
    background: #e7f6fd;
    color: #0061a8;
}

.app-nav-link.active {
    background: #0061a8;
    color: #ffffff;
}

.app-shell {
    padding: 32px 0 24px;
    flex: 1 0 auto;
}

.app-main {
    max-width: 1100px;
}

.app-footer {
    background: #ffffff;
    border-top: 1px solid #dbe3f0;
    color: #4b5563;
    margin-top: auto;
}

/* =========================================================
   Cards and buttons
   ========================================================= */

.app-card {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 32px;
}

.app-card-narrow {
    max-width: 720px;
    margin: 0 auto;
}

.btn-submit {
    font-family: 'AkkoProRegular';
    font-size: 1rem;
    padding: 0.55rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0061a8, #52c3eb);
    border: none;
    color: #ffffff;
    transition: 0.2s ease;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #00538f, #3db7e8);
    color: #ffffff;
}

.btn-manage {
    border-radius: 999px;
    border-color: #0061a8;
    color: #0061a8;
    font-weight: 600;
}

.btn-manage:hover {
    background: #e7f6fd;
    border-color: #0061a8;
    color: #004c80;
}

.card-title {
    font-weight: 700;
    color: #0b1c33;
}

.card-text {
    color: #4b5563;
}

/* =========================================================
   Manage nav links
   ========================================================= */

.manage-nav {
    background: #f8fafc;
    border-bottom: 1px solid #dbe3f0;
}

.manage-nav-link {
    color: #0b1c33;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
    font-weight: 600;
}

.manage-nav-link:hover {
    background: #e7f6fd;
    color: #0061a8;
}

.manage-nav-link.active {
    background: #0061a8;
    color: #ffffff;
}

/* =========================================================
   Home hero
   ========================================================= */

.home-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-callout {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    max-width: 720px;
}

/* =========================================================
   Track page
   ========================================================= */

.track-postcode-form {
    align-items: flex-start;
}

.track-postcode-form .postcode-input-group {
    max-width: 320px;
    width: 100%;
}

.track-postcode-form .btn {
    align-self: flex-end;
}

.track-meta {
    min-width: 280px;
    border-radius: 14px;
}

.track-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.track-selector {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}

.track-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.track-selector-button {
    text-align: left;
    border: 1px solid #dbe3f0;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.track-selector-button:hover,
.track-selector-button:focus-visible {
    border-color: #0061a8;
    box-shadow: 0 8px 18px rgba(0, 97, 168, 0.12);
    outline: none;
}

.track-selector-button.active {
    border-color: #0061a8;
    background: linear-gradient(135deg, rgba(0, 97, 168, 0.04), #ffffff);
}

.track-selector-title {
    font-weight: 700;
    color: #0b1c33;
}

.track-selector-sub {
    color: #4b5563;
    font-size: 0.95rem;
}

.track-selector-meta {
    color: #0061a8;
    font-weight: 600;
    margin-top: 6px;
}

.track-timeline {
    border-radius: 16px;
}

.badge-status {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-status-primary {
    background: #e0f2ff;
    color: #0b1c33;
    border-color: #b6ddff;
}

.badge-status-success {
    background: #e7f8ef;
    color: #0f5132;
    border-color: #b8e3cb;
}

.badge-status-warning {
    background: #fff4e5;
    color: #8a4b01;
    border-color: #ffd8a8;
}

.badge-status-neutral {
    background: #f2f4f7;
    color: #1f2937;
    border-color: #e5e7eb;
}

.track-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.track-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 16px 0;
    position: relative;
}

.track-step::after {
    content: "";
    position: absolute;
    top: 0;
    left: 13px;
    width: 2px;
    height: 100%;
    background: #e5e7eb;
    z-index: 0;
}

.track-step:last-child::after {
    display: none;
}

.track-step-marker {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #dbe3f0;
    background: #ffffff;
    z-index: 1;
    margin-top: 4px;
}

.track-step.completed .track-step-marker {
    background: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.track-step.current .track-step-marker {
    background: #0061a8;
    border-color: #0061a8;
    box-shadow: 0 0 0 4px rgba(0, 97, 168, 0.18);
}

.track-step.onhold .track-step-marker {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.track-step-body {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    z-index: 1;
}

.track-step-title {
    font-weight: 700;
    color: #0b1c33;
}

.track-step-text {
    font-size: 0.98rem;
}

.track-step-time {
    font-weight: 600;
}

.track-branch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-left: 8px;
}

.track-branch {
    position: relative;
    padding-left: 18px;
}

.track-branch::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.track-branch-marker {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
}

.track-branch-body {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
}

.alert-icon {
    font-size: 1.4rem;
}
.track-step-header,
.track-branch-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    align-items: flex-start;
}

/* Wider for main step meta so "Less than a minute" fits */
.track-step-meta {
    max-width: 14rem;
}

/* Branch rows can stay a bit tighter */
.track-branch-meta {
    max-width: 11rem;
}

@media (max-width: 767.98px) {
    .track-step-header,
    .track-branch-header {
        grid-template-columns: 1fr;
        row-gap: 0.5rem;
    }

    .track-step-meta,
    .track-branch-meta {
        text-align: left;
        max-width: none;
    }
}
