.msc-tp-wrap {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    min-height: 760px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.msc-tp-panel {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
}

.msc-tp-panel-inner {
    height: 760px;
    overflow-y: auto;
    padding: 24px;
}

.msc-tp-header {
    margin-bottom: 22px;
}

.msc-tp-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.msc-tp-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.15;
    color: #0f172a;
}

.msc-tp-header p {
    margin: 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.45;
}

.msc-tp-form {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.msc-tp-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.msc-tp-field input,
.msc-tp-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    box-sizing: border-box;
}

.msc-tp-field input:focus,
.msc-tp-field select:focus {
    outline: 3px solid rgba(14, 165, 233, 0.18);
    border-color: #0284c7;
}

.msc-tp-primary-btn,
.msc-tp-small-btn,
.msc-tp-card-actions a,
.msc-tp-card-actions button,
.msc-tp-info-actions a,
.msc-tp-info-actions button,
.msc-tp-access-btn,
.msc-tp-selected-item button,
.msc-tp-selected-item a {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    box-sizing: border-box;
}

.msc-tp-primary-btn {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    background: #00587a;
    color: #ffffff;
    font-size: 16px;
}

.msc-tp-primary-btn:hover {
    background: #004765;
    color: #ffffff;
}

.msc-tp-small-btn {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 13px;
}

.msc-tp-small-btn:hover {
    background: #e2e8f0;
}

.msc-tp-status {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
}

.msc-tp-status-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.msc-tp-status-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.msc-tp-status-loading {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.msc-tp-results-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 12px;
}

.msc-tp-results-heading h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.msc-tp-results-heading span {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.msc-tp-results {
    display: grid;
    gap: 12px;
}

.msc-tp-empty,
.msc-tp-limited-note {
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.msc-tp-card {
    position: relative;
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.msc-tp-card:hover,
.msc-tp-card-active {
    border-color: #0284c7;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}

.msc-tp-card-focus {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.msc-tp-card-body,
.msc-tp-card-image {
    position: relative;
    z-index: 2;
}

.msc-tp-card-image {
    width: 94px;
    height: 94px;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
}

.msc-tp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.msc-tp-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f766e;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.msc-tp-card-body {
    min-width: 0;
}

.msc-tp-card-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.msc-tp-card-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.msc-tp-card-distance {
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
}

.msc-tp-card h4 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.25;
}

.msc-tp-card p {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.msc-tp-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msc-tp-card-actions a,
.msc-tp-card-actions button {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.msc-tp-card-actions a {
    background: #00587a;
    color: #ffffff;
}

.msc-tp-card-actions button {
    background: #f1f5f9;
    color: #0f172a;
}

.msc-tp-card-actions .msc-tp-cta-primary {
    background: #00587a;
    color: #ffffff;
}

.msc-tp-map-area {
    min-width: 0;
    min-height: 760px;
}

.msc-tp-map {
    width: 100%;
    height: 100%;
    min-height: 760px;
}

.msc-tp-info-window {
    max-width: 260px;
}

.msc-tp-info-window .msc-tp-card-image {
    width: 100%;
    height: 110px;
    margin-bottom: 9px;
}

.msc-tp-info-body strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 15px;
}

.msc-tp-info-body span {
    display: block;
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.msc-tp-info-actions {
    display: flex;
    gap: 8px;
}

.msc-tp-info-actions a,
.msc-tp-info-actions button {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    font-size: 12px;
}

.msc-tp-info-actions a {
    background: #00587a;
    color: #ffffff;
}

.msc-tp-info-actions button {
    background: #f1f5f9;
    color: #0f172a;
}

.msc-tp-info-actions .msc-tp-info-cta-primary {
    background: #00587a;
    color: #ffffff;
}

.msc-tp-trip-box {
    margin: 0 0 18px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.msc-tp-trip-title {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.msc-tp-selected-list {
    display: grid;
    gap: 8px;
}

.msc-tp-trip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.msc-tp-trip-note {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

#msc-tp-clear-trip {
    margin-top: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

.msc-tp-selected-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.msc-tp-selected-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.msc-tp-selected-title {
    min-width: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.msc-tp-selected-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.msc-tp-selected-heading {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0f766e;
}

.msc-tp-selected-distance {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.msc-tp-selected-item a,
.msc-tp-selected-item button {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
}

.msc-tp-selected-item a {
    background: #00587a;
    color: #ffffff;
}

.msc-tp-selected-item button {
    background: #f1f5f9;
    color: #0f172a;
}

.msc-tp-notice,
.msc-tp-access-box {
    max-width: 720px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.msc-tp-access-box h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.msc-tp-access-box p {
    margin: 0 0 18px;
    color: #475569;
}

.msc-tp-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.msc-tp-access-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #f1f5f9;
    color: #0f172a;
}

.msc-tp-access-btn-primary {
    background: #00587a;
    color: #ffffff;
}

/* Mobile Media Query with Map Order Swapped */
@media (max-width: 980px) {
    .msc-tp-wrap {
        display: flex;
        flex-direction: column;
    }

    .msc-tp-panel {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        order: 2; /* Pushes the list and form below the map */
    }

    .msc-tp-panel-inner {
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 18px;
    }

    .msc-tp-map-area {
        min-height: 520px;
        height: 520px;
        order: 1; /* Pulls the map to the very top */
    }
    
    .msc-tp-map {
        min-height: 520px;
        height: 520px;
    }
}

@media (max-width: 620px) {
    .msc-tp-header h2 {
        font-size: 24px;
    }

    .msc-tp-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .msc-tp-card-image {
        width: 82px;
        height: 82px;
    }

    .msc-tp-card p {
        display: none;
    }

    .msc-tp-card-actions {
        gap: 6px;
    }

    .msc-tp-card-actions a,
    .msc-tp-card-actions button {
        min-height: 32px;
        padding: 6px 8px;
    }

    .msc-tp-selected-item {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .msc-tp-selected-item a,
    .msc-tp-selected-item button {
        grid-column: span 1;
    }
}