:root {
    --bg-color: #f9f9f9;
    --text-color: #333;
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --input-bg: #ffffff;
    --input-text: #333;
    --link-color: #1a0dab;
    --secondary-text: #545454;
    --status-text: #666;
    --tab-bg-hover: #e9ecef;
    --table-header-bg: #0056b3;
    --table-border: #ddd;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --card-border: #333;
    --input-bg: #2d2d2d;
    --input-text: #ffffff;
    --link-color: #8ab4f8;
    --secondary-text: #b0b0b0;
    --status-text: #aaa;
    --tab-bg-hover: #2d2d2d;
    --table-header-bg: #1a4175;
    --table-border: #444;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 40px auto; 
    max-width: 1100px; 
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* HLAVNÍ NAVIGAČNÍ MENU */
.main-nav {
    display: flex;
    gap: 10px;
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    align-items: center;
    border: 1px solid var(--card-border);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.main-nav a:hover { background-color: var(--tab-bg-hover); }
.main-nav a.active { color: #0056b3; background-color: var(--tab-bg-hover); }
.dark-mode .main-nav a.active { color: #8ab4f8; }

.theme-toggle {
    margin-left: auto; 
    background: none;
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
}

h1 { margin-bottom: 5px; }
.subtitle { color: var(--status-text); font-size: 14px; margin-bottom: 20px; }

/* STYLY PRO HLEDAČ VSTUPENEK */
.search-box { display: flex; gap: 10px; margin-bottom: 15px; }
input[type="text"] { flex-grow: 1; padding: 12px; font-size: 16px; border: 1px solid var(--card-border); border-radius: 4px; background-color: var(--input-bg); color: var(--input-text); }
button.search-btn { padding: 12px 24px; font-size: 16px; background-color: #0056b3; color: white; border: none; border-radius: 4px; cursor: pointer; }
button.search-btn:hover { background-color: #004494; }
.filters { margin-bottom: 30px; font-size: 15px; color: var(--secondary-text); display: flex; align-items: center; gap: 8px; }
.filters input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.spinner { display: none; width: 30px; height: 30px; border: 4px solid rgba(0, 0, 0, 0.1); border-left-color: #0056b3; border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 15px; margin-bottom: 15px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.past-event { opacity: 0.5; filter: grayscale(80%); }

/* ZÁKLADNÍ HLAVIČKA KARTY (VYHLEDÁVAČ) */
.card-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; }

.badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.highlight { background-color: #ffd54f; color: #000; font-weight: bold; padding: 0 2px; }
.event-dates { font-size: 13px; color: #d9534f; font-weight: 600; margin: 5px 0; display: inline-block; background: rgba(217, 83, 79, 0.1); padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(217, 83, 79, 0.3); }
.result-card a { color: var(--link-color); text-decoration: none; font-weight: bold; font-size: 18px; }
.result-card a:hover { text-decoration: underline; }
.result-card p { color: var(--secondary-text); margin: 8px 0 0 0; font-size: 14px; line-height: 1.4; }
.source-link { color: #006621; font-size: 11px; margin-top: 8px; word-break: break-all; }
#status { text-align: center; font-style: italic; color: var(--status-text); margin-bottom: 15px; }

/* RYCHLÉ ODKAZY */
.quick-links-container { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--card-border); text-align: center; }
.quick-links-container h3 { color: var(--secondary-text); font-size: 14px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.quick-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.quick-link-btn { background-color: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-color); padding: 8px 16px; text-decoration: none; border-radius: 20px; font-size: 14px; font-weight: bold; transition: all 0.2s; }
.quick-link-btn:hover { background-color: var(--card-border); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* TABULKY */
.info-table { width: 100%; border-collapse: collapse; margin-top: 15px; background-color: var(--card-bg); box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
.info-table th, .info-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--table-border); vertical-align: top; }
.info-table th { background-color: var(--table-header-bg); color: white; font-weight: bold; }
.info-table tr:last-child td { border-bottom: none; }

.info-table td:nth-child(2), 
.info-table td:nth-child(3) {
    white-space: nowrap;
}

/* STYLY PRO UZÁVĚRKY (KARTY) */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.portal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.portal-card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--card-border);
    color: #0056b3;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .portal-card h2 { color: #8ab4f8; }

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checklist li strong {
    color: var(--text-color);
}

/* Štítky pro Ano/Ne v uzávěrkách */
.badge-yes {
    display: inline-block;
    background-color: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #c3e6cb;
    width: fit-content;
}
.badge-no {
    display: inline-block;
    background-color: #f8d7da;
    color: #721c24;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #f5c6cb;
    width: fit-content;
}
.dark-mode .badge-yes { background-color: #1e4620; color: #75b798; border-color: #198754; }
.dark-mode .badge-no { background-color: #4a1a1e; color: #ea868f; border-color: #dc3545; }

/* Stylování samotné ikonky otazníku */
.tooltip {
    cursor: help; 
    position: relative;
    display: inline-block;
    margin-left: 4px;
    font-size: 0.9em;
}

.tooltip::after {
    content: attr(data-text); 
    position: absolute;
    bottom: 150%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #333; 
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

body.dark-mode .tooltip::after {
    background-color: #eee;
    color: #111;
}
body.dark-mode .tooltip::before {
    border-color: #eee transparent transparent transparent;
}

.sales-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    font-size: 1.05em;
}

body.dark-mode .sales-info {
    border-bottom: 1px dashed #555;
}

.closing-details summary {
    cursor: pointer;
    font-weight: bold;
    color: #0056b3;
    padding: 5px 0;
    transition: color 0.2s ease;
    user-select: none; 
}

.closing-details summary:hover {
    color: #003d82;
}

body.dark-mode .closing-details summary {
    color: #8ab4f8;
}

body.dark-mode .closing-details summary:hover {
    color: #aecbfa;
}

.action-details {
    margin-top: 8px;
}

.action-details summary {
    cursor: pointer;
    font-weight: bold;
    padding: 6px 0;
    transition: color 0.2s ease;
    user-select: none;
}

.action-details.sell summary { color: #28a745; }
.action-details.sell summary:hover { color: #1e7e34; }
body.dark-mode .action-details.sell summary { color: #5cb85c; }

.action-details.close summary { color: #0056b3; }
.action-details.close summary:hover { color: #003d82; }
body.dark-mode .action-details.close summary { color: #8ab4f8; }

.step-list {
    margin-top: 10px;
    margin-bottom: 15px;
    padding-left: 25px;
    font-size: 0.95em;
    line-height: 1.5;
}

.step-list li {
    margin-bottom: 8px;
}

.mode-switch-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.mode-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: #e0e0e0;
    color: #555;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mode-btn:hover {
    background-color: #d0d0d0;
}

.mode-btn.sell-btn.active {
    background-color: #28a745;
    color: white;
}

.mode-btn.close-btn.active {
    background-color: #0056b3;
    color: white;
}

body.dark-mode .mode-btn {
    background-color: #333;
    color: #aaa;
}
body.dark-mode .mode-btn:hover {
    background-color: #444;
}
body.dark-mode .mode-btn.sell-btn.active { background-color: #218838; color: white; }
body.dark-mode .mode-btn.close-btn.active { background-color: #0056b3; color: white; }

body.view-sell .content-close { display: none; }
body.view-close .content-sell { display: none; }

.mode-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}
.mode-content.content-sell h4 { color: #28a745; }
.mode-content.content-close h4 { color: #0056b3; }
body.dark-mode .mode-content.content-sell h4 { color: #5cb85c; }
body.dark-mode .mode-content.content-close h4 { color: #8ab4f8; }

/* --- HLAVIČKA KARET (POUZE PRO UZÁVĚRKY) --- */
.portal-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

body.dark-mode .portal-card .card-header {
    border-bottom-color: #444;
}

.portal-card .card-header h2 {
    margin: 0;
    font-size: 1.3em; 
    line-height: 1.2;
    border-bottom: none;
}

.payment-icon {
    font-size: 1.6em;
    cursor: help;
    flex-shrink: 0; 
}

.payment-icon.tooltip::after {
    left: auto;
    right: -5px;
    transform: none;
}
.payment-icon.tooltip::before {
    left: auto;
    right: 10px;
    transform: none;
}

.parking-widget {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: 400px;
}

body.dark-mode .parking-widget {
    background-color: #2c2c2c;
    border-color: #444;
}

.parking-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parking-status-box {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
}

.park-paid { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.park-free { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

body.dark-mode .park-paid { background-color: #4a1a1e; color: #ea868f; border-color: #dc3545; }
body.dark-mode .park-free { background-color: #1e4620; color: #75b798; border-color: #198754; }

.parking-info {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

body.dark-mode .parking-info {
    color: #bbb;
}

.parking-prices summary {
    cursor: pointer;
    font-weight: bold;
    color: #0056b3;
    padding: 5px 0;
}

body.dark-mode .parking-prices summary { color: #8ab4f8; }

.parking-prices ul {
    margin-top: 10px;
    padding-left: 20px;
    font-size: 0.95em;
}

.parking-prices ul li {
    margin-bottom: 5px;
}

.bulletin-board {
    background-color: #fff9c4; 
    border: 1px solid #fbc02d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    max-width: 400px;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.1);
    position: relative;
}

body.dark-mode .bulletin-board {
    background-color: #3e3a10; 
    border-color: #fbc02d;
    color: #eee;
}

.bulletin-board h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#noteArea {
    width: 100%;
    height: 150px;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #fbc02d;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1em;
    line-height: 1.5;
    resize: none; 
    outline: none;
    color: inherit;
}

.bulletin-footer {
    margin-top: 10px;
    font-size: 0.8em;
    color: #7f8c8d;
    text-align: right;
    font-style: italic;
} 