/* grafs.css - style dla tablicy kolejowej i wyszukiwarki polaczen */
:root {
    --bg-overlay: rgba(15, 23, 42, 0.55);
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary-blue: #003580;
    --primary-blue-hover: #002559;
    --obb-red: #e2001a;
    --obb-red-hover: #b80015;
    --plk-green: #16a34a;
    --plk-green-hover: #15803d;
    --border-color: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(var(--bg-overlay), var(--bg-overlay)),
                url('pociag_tlo.jpg') center/cover fixed;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: var(--text-main);
}

.container {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 960px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
}

.clock {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 2px;
    color: var(--text-main);
    line-height: 1.1;
}

.date-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 10px;
}

.input-group {
    position: relative;
    margin-bottom: 10px;
}

input[type="text"],
input[type="date"],
input[type="time"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary-blue);
}

.swap-wrapper {
    display: flex;
    justify-content: center;
    margin: -4px 0 6px;
}

.swap-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.swap-btn:hover {
    background: #f1f5f9;
}

.datetime-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0 18px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.btn-blue {
    background: var(--primary-blue);
}

.btn-blue:hover {
    background: var(--primary-blue-hover);
}

.btn-red {
    background: var(--obb-red);
    margin-bottom: 0;
}

.btn-red:hover {
    background: var(--obb-red-hover);
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    display: none;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:hover {
    background: #eff6ff;
}

.board-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.board-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.board-table-wrap {
    margin-top: 16px;
    max-height: 410px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid #e2e8f0;
    color: var(--text-muted);
    font-weight: 600;
}

td {
    padding: 11px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.empty-row {
    text-align: center;
    color: #94a3b8;
    padding: 28px;
}

.error-row {
    text-align: center;
    color: #b91c1c;
}

.delay-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #fee2e2;
    color: #b91c1c;
    margin-left: 4px;
}

.on-time {
    color: #15803d;
    font-weight: 600;
}

.bottom-bar {
    max-width: 1320px;
    width: 100%;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .bottom-bar {
        grid-template-columns: 1fr 1fr;
    }
}

.tile-link {
    text-decoration: none;
    background: rgba(30, 41, 59, 0.92);
    color: #fff;
    padding: 15px 18px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.15s, background 0.2s;
}

.tile-link:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.98);
}

.tile-green {
    background: var(--plk-green);
}

.tile-green:hover {
    background: var(--plk-green-hover);
}
