/* CSS for Unit Converter (Calculator) */
.modal-overlay-uc {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20000;
    justify-content: center;
    align-items: center;
}

.conv-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 320px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: popInUC 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

@keyframes popInUC {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.conv-display {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.conv-val-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    text-align: right;
    word-break: break-all;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.conv-result-box {
    background: #f1f3f5;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #4361ee;
}

#convResultBase {
    font-size: 1.15rem;
    font-weight: 800;
    color: #212529;
    text-align: right;
}

.conv-unit-label {
    font-size: 0.7rem;
    color: #adb5bd;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
}

.conv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.conv-btn {
    height: 50px;
    border: none;
    border-radius: 8px;
    background: #f1f3f5;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conv-btn:hover {
    background: #e9ecef;
}

.conv-btn.action {
    background: #e7f5ff;
    color: #228be6;
}

.conv-btn.confirm {
    background: #4361ee;
    color: white;
    grid-column: span 2;
}

.conv-btn.confirm:hover {
    filter: brightness(1.1);
}

.conv-unit-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.uc-unit-pill {
    padding: 6px 12px;
    border-radius: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.75rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.uc-unit-pill.active {
    background: #4361ee;
    color: white;
    border-color: #4361ee;
}