/* ============================================================
   Transport Calculator – Frontend Styles
   ============================================================ */

:root {
	--tc-primary:   #ec5c17;
	--tc-dark:      #111828;
	--tc-accent:    #0c77bc;
	--tc-light:     #f8f9fa;
	--tc-border:    #dee2e6;
	--tc-radius:    12px;
	--tc-shadow:    0 4px 24px rgba(17,24,40,.12);
	--tc-text:      #212529;
	--tc-muted:     #6c757d;
}

/* Wrapper */
.tc-calculator-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--tc-text); line-height: 1.6; margin: 0 auto; }
.tc-calculator-inner { background: #fff; border-radius: var(--tc-radius); box-shadow: var(--tc-shadow); overflow: hidden; }

/* Header */
.tc-header { background: linear-gradient(135deg, var(--tc-dark) 0%, #1e2d45 100%); padding: 32px 36px; text-align: center; }
.tc-title { color: #fff; margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.tc-subtitle { color: rgba(255,255,255,.7); margin: 0; font-size: 15px; }

/* Body layout */
.tc-body { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: start; }
@media (max-width: 900px) { .tc-body { grid-template-columns: 1fr; } }

/* Left column */
.tc-left-col { display: flex; flex-direction: column; border-right: 1px solid var(--tc-border); }
@media (max-width: 900px) { .tc-left-col { border-right: none; border-bottom: 1px solid var(--tc-border); } }

/* Locations panel */
.tc-locations-panel { padding: 24px; display: flex; flex-direction: column; gap: 0; }
.tc-location-field { padding: 14px 0; }
.tc-location-field + .tc-location-field { border-top: 1px dashed var(--tc-border); }
.tc-location-label { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; color: var(--tc-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

/* Point icons */
.tc-point-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.tc-point-origin { background: var(--tc-primary); }
.tc-point-dest   { background: var(--tc-accent); }

/* Search */
.tc-search-wrap { position: relative; }
.tc-search-input { width: 100%; box-sizing: border-box; padding: 11px 16px; border: 1.5px solid var(--tc-border); border-radius: 8px; font-size: 14px; transition: border-color .2s, box-shadow .2s; outline: none; background: #fff; }
.tc-search-input:focus { border-color: var(--tc-accent); box-shadow: 0 0 0 3px rgba(12,119,188,.12); }
.tc-search-input::placeholder { color: #aaa; }

/* Dropdown */
.tc-search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--tc-border); border-top: none; border-radius: 0 0 8px 8px; z-index: 1000; max-height: 220px; overflow-y: auto; box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.tc-dropdown-item { padding: 10px 16px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f0f0f0; transition: background .15s; display: flex; align-items: center; gap: 8px; }
.tc-dropdown-item:last-child { border-bottom: none; }
.tc-dropdown-item:hover, .tc-dropdown-item.highlighted { background: rgba(12,119,188,.07); color: var(--tc-accent); }
.tc-dropdown-item .tc-drop-icon { color: #aaa; font-size: 16px; flex-shrink: 0; }
.tc-dropdown-loading, .tc-dropdown-no-results { padding: 12px 16px; color: var(--tc-muted); font-size: 13px; font-style: italic; }

/* Coords display */
.tc-coords-display { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; background: var(--tc-light); border-radius: 6px; font-size: 12px; color: var(--tc-muted); }
.tc-coords-display .dashicons { font-size: 14px; color: var(--tc-muted); }
.tc-coords-display.tc-coords-set { background: rgba(12,119,188,.07); color: var(--tc-accent); }
.tc-coords-display.tc-coords-set .dashicons { color: var(--tc-accent); }

/* Swap button */
.tc-swap-btn-wrap { display: flex; justify-content: center; padding: 4px 0; }
.tc-swap-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--tc-light); border: 1.5px solid var(--tc-border); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .2s; color: var(--tc-muted); }
.tc-swap-btn:hover { background: var(--tc-primary); border-color: var(--tc-primary); color: #fff; transform: rotate(180deg); }

/* Map instruction */
.tc-map-instruction { background: var(--tc-dark); color: rgba(255,255,255,.85); padding: 9px 20px; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.tc-map-instruction .dashicons { font-size: 15px; color: var(--tc-primary); }

/* Map */
.tc-map-container { flex: 1; min-height: 300px; position: relative; }
.tc-map { width: 100%; cursor: crosshair !important; }
.tc-map .leaflet-container { cursor: crosshair !important; }

/* Right column */
.tc-right-col { padding: 24px; display: flex; flex-direction: column; gap: 16px; align-self: start; }

/* Card section */
.tc-card-section { background: var(--tc-light); border-radius: 10px; padding: 20px; border: 1px solid var(--tc-border); }
.tc-section-title { margin: 0 0 16px; font-size: 14px; font-weight: 700; color: var(--tc-dark); display: flex; align-items: center; gap: 8px; }
.tc-section-title .dashicons { color: var(--tc-primary); font-size: 18px; }

/* Fields */
.tc-field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tc-field-group label { font-size: 13px; font-weight: 600; color: #444; }
.tc-required { color: var(--tc-primary); margin-left: 2px; }
.tc-input-wrap { position: relative; display: flex; }
.tc-field-input { flex: 1; padding: 10px 46px 10px 14px; border: 1.5px solid var(--tc-border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; background: #fff; }
.tc-field-input:focus { border-color: var(--tc-accent); box-shadow: 0 0 0 3px rgba(12,119,188,.12); }
.tc-unit { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 12px; background: #e9ecef; border: 1.5px solid var(--tc-border); border-left: none; border-radius: 0 8px 8px 0; font-size: 12px; color: var(--tc-muted); font-weight: 600; }

/* Dimensions */
.tc-dimensions-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.tc-dim-field .tc-field-input { padding-right: 38px; }
.tc-dimensions-note { font-size: 11px; color: var(--tc-muted); margin: 4px 0 0; font-style: italic; }

/* Calculate button */
.tc-calculate-btn { width: 100%; padding: 14px 20px; background: linear-gradient(135deg, var(--tc-primary) 0%, #d04e0f 100%); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: .2px; box-shadow: 0 4px 12px rgba(236,92,23,.35); }
.tc-calculate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(236,92,23,.45); }
.tc-calculate-btn:active { transform: translateY(0); }
.tc-calculate-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.tc-btn-icon { font-size: 18px; }

/* Spinner */
.tc-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; border-top-color: #fff; animation: tc-spin .7s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* Error */
.tc-error-msg { background: #fff5f5; border: 1px solid #fc8181; color: #c53030; padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5; }

/* Result */
.tc-result { background: var(--tc-light); border: 1px solid var(--tc-border); border-radius: 10px; overflow: hidden; }

.tc-result-header { background: linear-gradient(135deg, var(--tc-accent) 0%, #0960a0 100%); color: #fff; padding: 12px 18px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: .2px; text-transform: uppercase; }
.tc-result-header .dashicons { font-size: 18px; }

/* Route summary */
.tc-route-summary { padding: 14px 18px; background: rgba(12,119,188,.06); border-bottom: 1px solid var(--tc-border); font-size: 13px; color: #444; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-route-summary strong { color: var(--tc-dark); }
.tc-route-arrow { color: var(--tc-primary); font-size: 18px; }

/* Breakdown */
.tc-breakdown { padding: 14px 18px; }
.tc-breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #eee; }
.tc-breakdown-row:last-child { border-bottom: none; }
.tc-breakdown-label { color: var(--tc-muted); }
.tc-breakdown-value { font-weight: 600; color: var(--tc-dark); }
.tc-breakdown-row.tc-minimum-row { color: var(--tc-primary); font-style: italic; font-size: 12px; }
.tc-breakdown-row.tc-minimum-row .tc-breakdown-value { color: var(--tc-primary); }

/* Total */
.tc-total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--tc-dark); }
.tc-total-label { color: rgba(255,255,255,.7); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tc-total-amount { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.tc-total-currency { font-size: 16px; margin-right: 3px; color: var(--tc-primary); }

/* Note & contact */
.tc-estimate-note { padding: 8px 18px; font-size: 11px; color: var(--tc-muted); font-style: italic; margin: 0; border-top: 1px solid var(--tc-border); }
.tc-contact-wrap { padding: 12px 18px; border-top: 1px solid var(--tc-border); }
.tc-contact-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; background: var(--tc-accent); color: #fff; text-decoration: none; border-radius: 8px; font-size: 13px; font-weight: 700; transition: background .2s, transform .1s; }
.tc-contact-btn:hover { background: #0960a0; transform: translateY(-1px); color: #fff; }

/* Leaflet custom markers */
.tc-marker-origin, .tc-marker-dest { width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; }
.tc-marker-origin { background: var(--tc-primary); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tc-marker-dest   { background: var(--tc-accent);  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tc-marker-inner { transform: rotate(45deg); color: #fff; font-size: 13px; font-weight: 700; }

/* Elementor placeholder */
.tc-elementor-placeholder { text-align: center; padding: 40px 20px; color: #aaa; }
.tc-elementor-placeholder .eicon-cart-medium { font-size: 48px; display: block; margin-bottom: 12px; }

/* Route line on map */
.tc-route-line { stroke: var(--tc-accent); stroke-width: 4; stroke-dasharray: 8, 6; opacity: .8; }

/* ============================================================
   MOBILE – max 768px
   ============================================================ */
@media (max-width: 768px) {
	.tc-header { padding: 20px 18px; }
	.tc-title  { font-size: 20px; }
	.tc-subtitle { font-size: 13px; }

	/* Map goes full width, fixed height */
	.tc-map-container { min-height: 260px; }
	.tc-map { height: 260px !important; }

	/* Locations panel compact */
	.tc-locations-panel { padding: 14px 14px 6px; gap: 0; }
	.tc-location-field  { padding: 10px 0; }
	.tc-location-label  { font-size: 11px; margin-bottom: 8px; }
	.tc-search-input    { font-size: 13px; padding: 9px 12px; }

	/* Swap button */
	.tc-swap-btn-wrap { padding: 2px 0; }

	/* Coords */
	.tc-coords-display { font-size: 11px; padding: 5px 8px; }

	/* Map instruction */
	.tc-map-instruction { font-size: 11px; padding: 7px 14px; }

	/* Right column */
	.tc-right-col { padding: 16px; gap: 12px; }
	.tc-left-col  { border-right: none; border-bottom: 1px solid var(--tc-border); }

	/* Card section */
	.tc-card-section { padding: 14px; }
	.tc-section-title { font-size: 13px; margin-bottom: 12px; }

	/* Weight field */
	.tc-field-group { margin-bottom: 10px; }
	.tc-field-group label { font-size: 12px; }
	.tc-field-input { font-size: 13px; padding: 9px 40px 9px 12px; }
	.tc-unit { font-size: 11px; padding: 0 8px; }

	/* Dimensions – 2 columns on mobile instead of 3 */
	.tc-dimensions-row { grid-template-columns: 1fr 1fr; gap: 8px; }
	.tc-dim-field:last-child { grid-column: 1 / -1; }
	.tc-dimensions-note { font-size: 11px; }

	/* Calculate button */
	.tc-calculate-btn { font-size: 14px; padding: 12px 16px; }
	.tc-btn-icon { font-size: 16px; }

	/* Result */
	.tc-result-header { font-size: 12px; padding: 10px 14px; }
	.tc-route-summary { font-size: 12px; padding: 10px 14px; flex-wrap: wrap; gap: 4px; }
	.tc-breakdown      { padding: 10px 14px; }
	.tc-breakdown-row  { font-size: 12px; }
	.tc-total-amount   { font-size: 20px; }
	.tc-total-row      { padding: 12px 14px; }
	.tc-estimate-note  { font-size: 10px; padding: 6px 14px; }
}

/* ============================================================
   MOBILE – max 480px (kis telefonok)
   ============================================================ */
@media (max-width: 480px) {
	.tc-header { padding: 16px 12px; }
	.tc-title  { font-size: 18px; }
	.tc-locations-panel { padding: 12px 10px 4px; }
	.tc-right-col { padding: 12px 10px; }
	.tc-card-section { padding: 12px 10px; }
	.tc-dimensions-row { grid-template-columns: 1fr; gap: 6px; }
	.tc-dim-field:last-child { grid-column: auto; }
	.tc-total-amount { font-size: 18px; }
}
