/* Journey Cost Calculator styles */

.jcc-calculator {
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: inherit;
}

.jcc-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.jcc-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jcc-panel-map .jcc-route-map {
    margin-top: 0;
}

.jcc-stop-handle {
    cursor: grab;
}

.jcc-stop-handle:active {
    cursor: grabbing;
}

.jcc-stop.is-dragging {
    opacity: 0.6;
    border-style: dashed;
}

.jcc-stop.is-drop-target {
    border-color: #7aa7d9;
    background: #eef5ff;
}

.jcc-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jcc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.jcc-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.jcc-distance-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
}

.jcc-distance-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.jcc-field input,
.jcc-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5d7de;
    border-radius: 6px;
    font-size: 15px;
}

.jcc-field input.is-readonly {
    background: #f3f4f7;
    color: #6b6e76;
}

.jcc-postcode-fields {
    display: none;
    gap: 16px;
    flex-direction: column;
}

.jcc-postcode-fields.is-active {
    display: flex;
}

.jcc-stops {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jcc-stop {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e1e4ec;
    background: #f9fafc;
}

.jcc-stop-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jcc-stop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jcc-stop-actions button,
.jcc-stop-add {
    border: 1px solid #c8ccd7;
    background: #ffffff;
    color: #1f2933;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.jcc-stop-actions button[disabled],
.jcc-stop-actions button[aria-disabled="true"] {
    cursor: not-allowed;
    background: #f1f3f7;
    color: #8a8f99;
    border-color: #dde1ea;
}

.jcc-stop-actions button:hover,
.jcc-stop-actions button:focus,
.jcc-stop-add:hover,
.jcc-stop-add:focus {
    background: #eef1f7;
    border-color: #a9b0c3;
}

.jcc-stop-add {
    align-self: flex-start;
}

.jcc-distance-status {
    font-size: 13px;
    color: #365a7a;
    margin: 0;
}

.jcc-distance-field {
    display: block;
}

.jcc-distance-field.is-hidden {
    display: none;
}

.jcc-submit {
    border: none;
    background: #0073aa;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.jcc-submit:hover,
.jcc-submit:focus {
    background: #005f87;
}

.jcc-results {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    background: #f6f7fb;
    border: 1px solid #e1e4ec;
    min-height: 50px;
}

.jcc-results h3 {
    margin-top: 0;
}

.jcc-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.jcc-result-card {
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e3e4ea;
}

.jcc-result-card span {
    display: block;
    font-size: 13px;
    color: #6b6e76;
}

.jcc-note {
    margin-top: 15px;
    font-size: 13px;
    color: #5c5f66;
}

.jcc-route-map {
    margin-top: 20px;
    background: #f6f7fb;
    border: 1px solid #e1e4ec;
    border-radius: 10px;
    padding: 12px;
}

.jcc-route-map.is-hidden {
    display: none;
}

.jcc-route-map-label {
    margin: 0 0 10px;
    font-weight: 600;
    font-size: 14px;
    color: #1f2933;
}

.jcc-route-map-frame {
    display: block;
    width: 100%;
    height: 360px;
    border-radius: 8px;
    border: 1px solid #d7dbe6;
}

@media (min-width: 1024px) {
    .jcc-layout {
        flex-direction: row;
        align-items: stretch;
    }

    .jcc-panel-form {
        flex: 0 0 40%;
    }

    .jcc-panel-map {
        flex: 1 1 60%;
    }

    .jcc-route-map-frame {
        height: 560px;
    }
}

.jcc-error {
    color: #a8071a;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 6px;
    padding: 12px;
}

/* Page content section */
.jcc-page-content {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e4ec;
}

.jcc-page-content p:last-child {
    margin-bottom: 0;
}

.jcc-page-content h1,
.jcc-page-content h2,
.jcc-page-content h3,
.jcc-page-content h4 {
    margin-top: 0;
}
