/* ========== ОСНОВНАЯ ОБОЛОЧКА МОДАЛКИ ========== */
.paramkit-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    transition: opacity 0.25s ease;
}

.paramkit-modal-open {
    display: flex;
}


.paramkit-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 660px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: paramkitFadeIn .25s ease;
}
.paramkit-measurement-image{
    max-width: 600px;
}
@keyframes paramkitFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.paramkit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.paramkit-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0;
    padding: 10px;
}

.paramkit-modal-close {
    font-size: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    transition: color 0.15s;
}
.paramkit-modal-close:hover {
    color: #000;
}

.paramkit-modal-body {
    position: relative;
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}


.paramkit-modal-body::-webkit-scrollbar {
    width: 6px;
}
.paramkit-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.25);
    border-radius: 4px;
}


.paramkit-modal-body::after {
    content: "";
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 100%);
    pointer-events: none;
    z-index: 5;
}

@media (max-width: 768px) {
    .paramkit-modal-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 8px;
    }

    .paramkit-modal-header {
        padding: 14px 18px;
    }

    .paramkit-modal-title {
        font-size: 16px;
    }

    .paramkit-modal-body {
        padding: 15px;
    }
}

.paramkit-size-tabs-wrapper {
    margin-top: 10px;
}

.paramkit-tab-nav,
.paramkit-size-tabs {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.paramkit-tab-nav li a,
.paramkit-size-tab {
    color: #222;
    line-height: 19px;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    padding: 5px 15px;
    position: relative;
    height: auto;
    font-size: 14px;
    background: #fff;
    border-radius: 15px;
    transition: background 0.15s, color 0.15s;
}

.paramkit-tab-nav li a:after,
.paramkit-size-tab:after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #aaa;
    border-radius: 14.5px;
    transition: border-color .15s, border-width .15s;
}

.paramkit-tab-nav li{
    display: block;
}
.paramkit-tab-nav li a{
    display: block;
    padding: 5px 20px;
}
.paramkit-tab-nav li a:hover:after,
.paramkit-size-tab:hover:after {
    border-color: #555;
}

.paramkit-tab-nav li a.active:after,
.paramkit-size-tab.active:after {
    border: 2px solid #222;
}
.paramkit-tab-content{
    overflow: auto;
}
.paramkit-tab-nav{
    margin: 0;
}
.paramkit-table thead{
    border: 1px solid #e2e2e2;
}
.paramkit-table{
    min-width: 100%;
    width: 100%;
    overflow-x: auto;
    position: relative;
}
.paramkit-table .head-table{
    font-size: 14px;
    color: #000;
    line-height: 14px;
    font-weight: 500;
    white-space: nowrap;
    background-color: #f6f6f6;
}
.paramkit-table th{
    border-right: 1px solid #E5E5E5;
    color: #000;
}
.paramkit-table th,
.paramkit-table td{
    min-width: 80px;
    padding: 12px 16px;
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 400;
}
.paramkit-table th:first-child,
.paramkit-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: #f6f6f6;
    box-shadow: 2px 0 5px rgb(0 0 0 / 10%);
}
.paramkit-table tr.paramkit-unavailable td{
    color: #9e9e9eb8;
}
.paramkit-size-content {
    animation: fadeInTab 0.2s ease;
}
@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}
.paramkit-size-row{
    position: relative;
}
.paramkit-size-row.active td{
    background-color: #ffc20d45;

}
.paramkit-size-row td:before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    background: #f6f6f6;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.paramkit-elasticity-section {
    width: 100%;
    margin: 0 auto;
    border-bottom: 1px solid #ccc;

}

.paramkit-elasticity-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.paramkit-elasticity-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

.elasticity-option {
    flex: 1;
    text-align: center;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.elasticity-option.active {
    color: #000;
    font-weight: bold;
}

.elasticity-option.active::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid #000;
}

.paramkit-elasticity-current {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

.paramkit-elasticity-current strong {
    color: #000;
}
.paramkit-measurement-container{
    position: relative;
}
.paramkit-value-badge {
    position: absolute;
    display: inline-block;
    background: #fff;
    border: 2px solid #fb7701;
    border-radius: 15px;
    padding: 6px;
    font-size: 13px;
    line-height: 13px;
    text-align: center;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.paramkit-tooltip {
    position: relative;
    display: block;
    width: 100%;
}

.paramkit-tooltip::before {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

.paramkit-tooltip:hover::before,
.paramkit-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
