.km-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}

.km-row select,
.km-row input {
    padding: 4px;
}

.km-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}


.km-program {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.km-program h4 {
    margin: 0 0 10px;
}

.km-bar {
    position: relative;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    height: 24px;
    margin-bottom: 8px;
	background: linear-gradient(
        90deg,
        #f44336 0%,
        #ff9800 50%,
        #4caf50 100%);
}

.km-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;

    /* niewypełniona część */
    /*width: calc(100% - var(--percent));*/
	left: var(--percent); 
    right: 0;
    background: #777;
    transition: width .6s ease;
}


.km-bar-fill {
    position: relative;
    height: 100%;
    width: var(--percent);

    color: #fff;
    font-weight: bold;
    text-align: right;
    padding-right: 8px;
    line-height: 24px;

    white-space: nowrap;
    z-index: 2;
}



.km-meta {
    font-size: 13px;
    color: #555;
}

#km-filters {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}
 
#km-search,
#km-faculty {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.km-errors {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 10px 0 15px;
    font-size: 14px;
}

.km-errors ul {
    margin: 0;
    padding-left: 18px;
}

.km-stars {
    color: #ddd;
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.km-star.active {
    color: #f5b301;
}

.km-chance {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
    cursor: pointer;
    transition: 0.2s ease;
}

.km-chance:hover {
    background: #eef3f8;
}

.km-chance-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.km-chance-label {
    font-size: 14px;
}

.km-chance-more {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}


.km-chance {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-weight: 600;
}

.km-stars {
    color: #ddd;
    font-size: 20px;
    letter-spacing: 2px;
}

.km-star.active {
    color: #f5b301;
}

/* IKONKA "i" */
.km-info {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
}

/* TOOLTIP */
.km-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: #1f2937;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

/* strzałka */
.km-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.km-info:hover .km-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.km-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-2px);
}


.km-dots {
    display: flex;
    gap: 4px;
}

.km-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
}

.km-dot.active {
    background: #2a7fff;
}

.km-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 12px;
    border-radius: 50%;
    background: #eee;
    cursor: help;
}

.km-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 10;
}

.km-info:hover .km-tooltip {
    opacity: 1;
}

/* kontener kropek */
.km-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/* pojedyncza kropka - stan domyślny */
.km-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;

    /* WCAG: widoczne nawet bez koloru */
    background-color: #f2f2f2;
    border: 2px solid #6b6b6b;

    box-sizing: border-box;
}

/* aktywna kropka */
.km-dot.active {
    /* bardzo wysoki kontrast */
    background-color: #0b5ed7; /* ciemny niebieski */
    border-color: #0b5ed7;
}

/* różnicowanie poziomów (opcjonalne, ale polecane UX) */
.km-chance-dots[data-level="1"] .km-dot.active {
    background-color: #9a1b1b; /* ciemna czerwień */
    border-color: #9a1b1b;
}

.km-chance-dots[data-level="2"] .km-dot.active {
    background-color: #b45309; /* ciemny pomarańcz */
    border-color: #b45309;
}

.km-chance-dots[data-level="3"] .km-dot.active {
    background-color: #1d6f42; /* ciemna zieleń */
    border-color: #1d6f42;
}

.km-chance-dots[data-level="4"] .km-dot.active {
    background-color: #0b5ed7; /* ciemny niebieski */
    border-color: #0b5ed7;
}

/* focus dla klawiatury */
.km-info:focus-visible,
.km-dot:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

